Subj : RegExp Behaviour in FSE To : Deuce From : Angus McLeod Date : Fri Mar 03 2006 01:51 am Re: RegExp Behaviour in FSE By: Deuce to Angus McLeod on Thu Mar 02 2006 12:45:00 > > To completely throw a spanner in the works: Quoting. How will you treat > > something like > > > > > yada yada yada yada yada yada yada yada yada yada yada yada Dumb > > > User yada yada yada yada yada yada yada > > > > when searching for /Dumb User/ or even /Dubm\s/User/m ? ;-) > > Well, I can't say it seems completely intuitive, since your example would > actually not have done what you said it would have. :-) Huh? I *know* it won't match because of the > and the extra whitespace characters. But should the quotation symbol be treated as whitespace (thus matching with \s) when applying RE's to quoted text? ;-) Just messing with ya.... > As for adding a soft CR, the spaces are *still* at the end of the line... so > soft CRs were expanded to hard, you'd need /Dumb\s+User/ reather than > /Dumb\sUser/ or /Dumb User/ Oh, OK, I didn't realise that you left the space at the end of the line. But what I'm saying is that I should be able to match /Dumb$/m when Dumb User is auto-wrapped at line end (like that). If I'm looking at the text and "Dumb" is at the end of the line, I *ought* to be able to match against it with /Dumb$/m withOUT having to guess whether there was an invisible space after the word, or whether that line break occured implicitly due to line-wrap or explicitly due to the press of the ENTER key. > As for quoting, I plan on using Deep Magic for it when possible. > And possibly even rewrapping it to fit in the smaller width. > > x8> DE> The fix is simply to use the correcty flags in the regex... m or s a > x8> DE> appropriate. Hmmm. --- Playing: "2000 Miles" by "Pretenders" from the "Learning to crawl" album þ Synchronet þ Making sure Jason works OK at The ANJO BBS .