I am experimenting with regular expressions in Toad Options > Editor > Behavior > Syntax Highlighting > Parser.
Looking to modify String: (?s)(’|")(.*?)(\1|\Z) to match everything between quotes EXCEPT words that start with specific combination of character. For example xx_ and xe_
Output should be (matches are red):
cat dog ‘space xx_cat rainbow xe_space car cloud xx_toad’ nothing
At first glance I don't think that's possible with regex, but I have had several glasses of wine and I'm in a Christmas food coma at the moment. What's your use case for not wanting the entire string decorated uniformly?
Thread created by fgsfds
I am experimenting with regular expressions in Toad Options > Editor > Behavior > Syntax Highlighting > Parser.
Looking to modify String: (?s)('|")(.*?)(\1|\Z) to match everything between quotes EXCEPT words that start with specific combination of character. For example xx_ and xe_
Output should be (matches are red):
cat dog 'space xx_cat
rainbow xe_space
car cloud xx_toad' nothing
Well, I am using background color for words that start with special prefixes like “xe_” (Lots of such objects in my organization’s db). And I thought that it might be a nice idea to quickly find them in the big amount of code no matter where they are. Even in the string.
I agree - very, very useful idea - maybe should be placed on toad idea pond so we call can vote on it.
I just wanted to state the non-obvious - it should work in strings as well as comments. Because if people are following good commenting guidelines, then comments as well as strings need to be in scope. I think that you said this by saying everything -
I’m just overstating it just to be sure