Tips on writing regular expressions for searching the post list
Moderators: Quade, dexter
by optiman » Sun Nov 02, 2008 8:42 pm
That latest beta is giving me problems, it broke my filter "ext\ \ [a-z]+"
So I'm trying to find other ways to filter. Does the filter look at the Subject line as displayed in Newsbin or the subject line as seen in the ACTUAL header line? The ACTUAL "Subject: blah blah" line is different. It often contains extra characters like "(1/1)" inserted. The filter usually ignores the extra characters in the Subject: real header.
So-- what is the actual set of characters the filter is parsed against?
Thanks!
-
optiman
- Seasoned User
-
- Posts: 251
- Joined: Tue Aug 05, 2003 1:06 am
Registered Newsbin User since: 12/13/03
by itimpi » Sun Nov 02, 2008 8:49 pm
I do not think that escaping spaces is working at the moment - you should try /s or [ ] instead.
-
itimpi
- Elite NewsBin User
-
- Posts: 12607
- Joined: Sat Mar 16, 2002 7:11 am
- Location: UK
Registered Newsbin User since: 03/28/03
by Quade » Sun Nov 02, 2008 9:26 pm
I don't think [ ] works either. No spaces are currently permitted in the search string. "/s" is how you want to represent spaces for now.
-
Quade
- Eternal n00b
-
- Posts: 44984
- Joined: Sat May 19, 2001 12:41 am
- Location: Virginia, US
Registered Newsbin User since: 10/24/97
-
by optiman » Mon Nov 03, 2008 2:11 am
I tried "/s", "\s", [ ]-- nothing seems to match spaces now. Good to know I wasn't imagining things though!
-
optiman
- Seasoned User
-
- Posts: 251
- Joined: Tue Aug 05, 2003 1:06 am
Registered Newsbin User since: 12/13/03
by Quade » Mon Nov 03, 2008 2:59 am
\s works fine for me. It means one space though.
"cpie\s\s2" for example.
"cpie\s+2" works too.
11-02-08 CPie 21 of 23 - <file>
Matched this. 2 spaces between cpie and the 2
-
Quade
- Eternal n00b
-
- Posts: 44984
- Joined: Sat May 19, 2001 12:41 am
- Location: Virginia, US
Registered Newsbin User since: 10/24/97
-
by bobkoure » Sat Nov 07, 2009 12:36 pm
Is \s "space" or "whitespace"? The standard is "whitespace", but I've seen some regex engines only match "space"...
-
bobkoure
-
Return to Regular Expressions
Who is online
Users browsing this forum: Google [Bot] and 2 guests