Page 1 of 1

Wide open (NB4) spaces

PostPosted: Tue Feb 05, 2002 9:10 pm
by GoAWest
I was trying to filter (Accept) a subject that looked something like this:

blah blah ... 6.13 VCD.r01 blah blah
(note: verified only one space between 13 & VCD)

So I set up an Accept filter of

6\.13\sVCD\.r

but it didn't work. So I then tried some variations

13\sVCD\.r
13 VCD\.r (just left a "<space>" in the middle spot)

and probably a few others. The one that finally worked is

13.*VCD\.r

This did allow a few other posts (e.g. I'm 13, Hi Mom VCD.rules!) but since I wasn't allowing automatic download I just didn't select the extra ones and only downloaded the ones I wanted.

So I'm not sure what was wrong but it seemed like NB wasn't locking on the \s as a single space. I did see a Dexter posting from 10-22-01 where he stated "The backslash does work when you are escaping a dot but it doesn't work with other characters including the asterisk and I just tested it with a square bracket. It should work consistently, we'll look into it."

Has this been fixed or am I doing something wrong? What's the correct RegEx syntax for matching a space (or non-space, \S, or etc.) in NB4b22?

RE: Wide open (NB4) spaces

PostPosted: Tue Feb 05, 2002 9:18 pm
by dexter
The \s, \S, \w, \W, \d, \D, etc are RegEx shortcuts that are supported in Perl but evidentally not in the RegEx engine we are using. (FYI, match white space or not, word or not, digit or not). To match just a space in your example, I'd create a set with a space in it using with brackets like this:

6\.13[ ]VCD\.r

That should do the trick.