Help me to modify regular expression that is used for PL/SQL syntax highlighting

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?

On Dec 21, 2013, at 4:45 AM, "fgsfds" bounce-fgsfds@toadworld.com wrote:

Help me to modify regular expression that is used for PL/SQL syntax highlighting

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

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.


No virus found in this message.

Checked by AVG - www.avg.com

Version: 2014.0.4259 / Virus Database: 3658/6936 - Release Date: 12/20/13

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 :slight_smile:

Bert