AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

tiny but helpful doc fix... \R = "R" inside chara

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
Joy2DWorld



Joined: 04 Dec 2006
Posts: 400
Location: Galil, Israel

PostPosted: Sun Jul 01, 2007 1:32 am    Post subject: tiny but helpful doc fix... \R = "R" inside chara Reply with quote

doc:
Quote:
In v1.0.46.06+, \R means "any single newline of any type" (namely `r, `n, or `r`n).


should be...


Quote:
In v1.0.46.06+, \R means "any single newline of any type" (namely `r, `n, or `r`n) but not inside a character set ("[\R]") where is means "R"

_________________
Joyce Jamce
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10463

PostPosted: Thu Jul 05, 2007 1:43 am    Post subject: Reply with quote

I'm not a PCRE or RegEx expert, this seems like a PCRE bug or quirk. If it's a bug, I think it should be reported and fixed. If it's intentional, I'd like an explanation if anyone knows one.

Thanks.
Back to top
View user's profile Send private message Send e-mail
Titan



Joined: 11 Aug 2004
Posts: 5009
Location: imaginationland

PostPosted: Thu Jul 05, 2007 8:32 am    Post subject: Reply with quote

I think it's intentional, most control chars have special meaning in sets e.g. \b is usually a zero-width word boundary but as [\b] it means a backspace character.
_________________

RegExReplace("irc.freenode.net/autohotkey", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2")
Back to top
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10463

PostPosted: Thu Jul 05, 2007 1:06 pm    Post subject: Reply with quote

Thanks. I found this mentioned in the PCRE docs, so I've revised the wording to be: \R means "any single newline of any type", namely `r, `n, or `r`n (except inside a character set, where \R is the same as the letter "R").
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group