|
Hazram Wanderer
Joined: 24 May 2005 Posts: 71
|
Posted: Mon Aug 01, 2011 5:49 pm
[SOLVED] Regex pattern oddity |
I can't figure out why this regex pattern in an ansi trigger:
^\s*((?:\e[\d{1,2}[mS]|[^\w>]|_|x|O)*)\s*\n\w
won't match this output (pasted from the script debugger showing ansi codes):
Quote: |
<ESC>[31m+<ESC>[0m
<ESC>[5S@<ESC>[0;31m+<ESC>[0m
This is plain text |
The pattern does work, in general, for similar sets of lines, but not this set, and I'm puzzled. Can anyone spot anything? |
|
Last edited by Hazram on Mon Aug 01, 2011 6:13 pm; edited 1 time in total |
|
|
|
Hazram Wanderer
Joined: 24 May 2005 Posts: 71
|
Posted: Mon Aug 01, 2011 6:07 pm |
Ah, I figured it out -- the ansi code for red in the output uses the optional \e[n1;n2{letter} format, which the pattern doesn't account for.
|
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|