Sublime Forum

Sublime 4192 regex not working

#1

I have a text file which has sections demarcated by lines in all capitals. Each section also begins with a quotation whose end is delimited by the sequence <0x1b>

I am using this
^[A-Z\s]+\n(.*?)(?=\x1b)
but find nothing.
In fact I cannot even find the line in all capitals (SECTION NAME) with this expression
^[A-Z]+$
Nothing is found

But this expression
^[A-Z]+
finds the first word of every line, capitalized or not

0 Likes

#2

I think one of the toggle buttons in the find panel turns on case sensitive mode, you should ensure that is enabled.
In terms of your (SECTION NAME) example, I imagine you need a space in your char class to handle multiple capitalized words. And if the parens are there in the text, then you need to cater for them in the regex too.
If it is having trouble finding the section delimiter, try copying it from the text and pasting it into the search box to search on it literally

0 Likes

#3

thank you that was it

0 Likes