Jump to content
Muxe Inc Forums
Sign in to follow this  
dandv

Negated character classes - a mess

Recommended Posts

dandv    0

NDN2.14.1985 (i.e. 9985)

 

Create the following PCREbug.txt file:

delta
alphaxxbeta
alphaxxbetayyteta
text
alphaxxbeta
gama

1. Search (F7), regular expression ON, for "text". Notice that the first search (i.e. immediately after you press Enter in the Search dialog, doesn't do anything. Press Ctrl+L to actually find "text".

 

2. Search for a bit of Garl's funky regular expression,

^[^y]+$

This should match any line not containing the character 'y'. Why doesn't this match anything?

 

3. Search for

xx[^y]+"

This should repeatedly find any "xx" followed by the longest string not containing "y". Why does Ctrl+L keep highlighting the same "alphaxxbeta" and then some nonexistent spaces instead of highlighting the second "alphaxxbeta" then stopping?

 

4. Search for

xx[^y]+$

This should find the same as above, but clearly

until the end of the line (no nonexistent spaces). Why does it only find the second "alphaxxbeta"?

 

 

I hope this is not a PCRE bug :-)

Dan Dascalescu

Share this post


Link to post
Share on other sites

hi!

 

1. you forgot to add that this only is true for the VIEWER!

this has been fixed 2 hours ago ;P

 

2.-4. these all work fine in editor

 

some don't work in viewer because MULTILINE is not enabled - but even then still not working correctly though

 

i assume there is a little problem with regex result handling

 

as you can see i haven't touched the viewer in some time because panel and editor keep me busy

 

Stefan / AH

 

PS: did you get the email regarding the team?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×