I have a column of coordinates. I need help to remove the outer square brackets from the co-ordinates

[[[93.898528, 24.796308], [94.144976, 24.796308], [94.144976, 25.04976], [93.898528, 25.04976]]]
[[[150.520928608, -34.1183470085], [151.343020992, -34.1183470085], [151.343020992, -33.578140996],[150.520928608, -33.578140996]]]
[[[76.84252, 28.397657], [77.347652, 28.397657], [77.347652, 28.879322], [76.84252, 28.879322]]]
[[[-88.473228, 30.144425], [-84.888247, 30.144425], [-84.888247, 35.008029], [-88.473228, 35.008029]]]
[[[76.84252, 28.397657], [77.347652, 28.397657], [77.347652, 28.879322], [76.84252, 28.879322]]]

So these are a few coordinates from the column. I just need to erase the single outer pair of square brackets from the co-ordinates. Manually erasing them would be a tedious job as I have thousands of entries. Is there any way to handle this in LibreCalc?
Thank You,

Do you want to remove only the first and last character from the string? Then why not take advantage

=MID(A2;2;LEN(A2)-2)

or something similar?
If you want to remove ALL square brackets from a string, then the tip @Grantler or @anon73440385 or the formula

=SUBSTITUTE(SUBSTITUTE(A1;"[";"");"]";" ")

will help you.

However, in this case, you will get not a set of coordinates, but just a string of values ​​separated by commas.
Perhaps it would be better to use “Text to columns” with a comma and square brackets to get a set of numbers in separate cells of the table?

My solution doesn’t remove All square brackets - just to be clear (but assumes that everything between starting [[[ and ending ]]] is in one cell, i.e. the question contains 5 rows in 1 column)

@anon73440385 Yes, of course! I did not very well formulated the phrase. Accept my apologies!

@JohnSUN - No problem at all. I’m sure you know better than me. Added the comment just for clarification of the reader and OP.

Find&Replace, [x] Regular expressions

Find All \[|\] finds every square bracket

Replace All (nothing) will delete each one

Hello

If I understand the question correctly you only want to remove the bracket [ leftmost and the bracket ] rightmost. All other brackets should be kept. If that understanding is correct - use:

  • Select the column containing your coordinates
  • Edit -> Find & Replace
    Find: \b\[(.+)\]\b
    Replace: $1
    Other Options 1: [x] Current selection only
    Other Options 1: [x] Regular expressions
  • Click button Find All to check, whether everything looks OK
  • Click button Replace All if previous step found all cells which should be changed.

Tested using LibreOffice:

Version: 6.4.3.2; Build ID: 747b5d0ebf89f41c860ec2a39efd7cb15b54f2d8
CPU threads: 8; OS: Linux 4.12; UI render: default; VCL: kf5; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US; Calc: threaded

Hope that helps.

If the answer helped to solve your problem, please click the check mark (:heavy_check_mark:) next to the answer.

Hey , thanks Opaque. That worked. Marking this as correct answer. I just wanted to ask what does the Current selection only option do? Because when I select that option it skips some entries and when not selected it considers all the entries.

:slight_smile: My Fault - sorry since a added the Find All step here and did not mention that you need to reselect the whole column again. The option is what it says: The find & replace is only performed on the selected range to avoid unintentional changes and I recommend to never ever leave it unchecked. But after Find all the selection changed to the cells found, which is a smaller range (in general) than your original selection.

@anon73440385. Also is there any way to check whether this column consisting of coordinates contains any alphabets or text?

Yes (e.g function =REGEX(A1,".+[:alpha:].+","alpha character found") will find alpha characters) but what do you want to do (Conditional formatting to highlight cells having a character, another Find & Replace, a warning column)? Please post a new question, since it is may be a new task requiring a new solution and this site isn’t meant being a forum but being a collection of solutions.