Page 1 of 1

[Solved] Search for both regex and non-regex

PostPosted: Sun Nov 17, 2019 3:40 am
by RusselB
I'm working with, and updating, the attached spreadsheet for a trip.
I want to work the trip so I don't hit any roads that are indicated as "HWY-" (without the quotes) and followed by a 3 digit number.
I've tried searching using HWY-, and it worked for a little bit, but was giving me hits for other highways, so I tried to incorporate [:digit:](3) into the search box of the Find & Replace dialog.
As that didn't return any results, despite the fact that I could see there should've been a match, I went back to the original search, but now that one also isn't returning any hits
I did remember to check the Regular Expressions box in More Options of the Find & Replace dialog.

If someone can provide the correct regex that I need for the search specified earlier, I would appreciate it.

While I think I've given enough information to answer my question without the file, the file is attached.....just in case.

Re: Search for both regex and non-regex

PostPosted: Sun Nov 17, 2019 4:01 am
by robleyd
Try replacing the parentheses with curly brackets -
Code: Select all   Expand viewCollapse view
HWY-[:digit:]{3}
That returns a number of results from your data.

Re: Search for both regex and non-regex

PostPosted: Sun Nov 17, 2019 4:24 pm
by RusselB
Thanks. Might be time for another visit to the optometrist, as I couldn't see the difference between the parentheses and curly brackets, not only in the help file (which I checked before posting here), but also in your posted code, so I'm glad you also wrote out the discrepancy in words.

Re: Search for both regex and non-regex

PostPosted: Sun Nov 17, 2019 4:43 pm
by RoryOF
RusselB wrote:Thanks. Might be time for another visit to the optometrist, as I couldn't see the difference between the parentheses and curly brackets, not only in the help file (which I checked before posting here), but also in your posted code, so I'm glad you also wrote out the discrepancy in words.


Remember one can change the scaling of the OO type, within limits, by clicking on the A symbol top right of the OO window, just above the "logout" item.

Re: [Solved] Search for both regex and non-regex

PostPosted: Sun Nov 17, 2019 5:27 pm
by RusselB
Thanks Rory.