Tips on writing regular expressions for searching the post list
Moderators: Quade, dexter
by Smite » Sun Sep 05, 2004 9:46 pm
Last edited by
Smite on Sat Mar 11, 2006 3:05 pm, edited 2 times in total.
Please read the
FAQ before asking any questions.
If you're new to newsgroups, and the files on them, you can find a very helpful guide
here.
-
Smite
- Katamari Damacy Addict
-
- Posts: 5318
- Joined: Sat May 19, 2001 1:54 am
- Location: Alberta, Canada
Registered Newsbin User since: 03/27/03
by dexter » Sun Sep 05, 2004 9:57 pm
Nice. I just stickyfied you.
-
dexter
- Site Admin
-
- Posts: 9511
- Joined: Fri May 18, 2001 3:50 pm
- Location: Northern Virginia, US
Registered Newsbin User since: 10/24/97
-
by georger » Wed Feb 16, 2005 12:23 am
Did not see this on the cheat sheet, but is this right for filtering (out) numbers only?
^[0-9]+$
And this would be to filter out any jpg prefixed with numbers:
^[0-9]+$\.jpg
Yes?
-
georger
- n00b
-
- Posts: 2
- Joined: Wed Feb 16, 2005 12:20 am
by dexter » Wed Feb 16, 2005 1:47 am
The ^ for "not" doesn't work. You can put
[0-9]+\.jpg
in the reject field, that will work.
-
dexter
- Site Admin
-
- Posts: 9511
- Joined: Fri May 18, 2001 3:50 pm
- Location: Northern Virginia, US
Registered Newsbin User since: 10/24/97
-
by bobkoure » Sat Mar 11, 2006 1:01 pm
It's moved (slightly) to
Links not allowed for unregistered users
-
bobkoure
-
by mcwebtree » Sat Mar 11, 2006 3:33 pm
I was about to say, but surely the addresses are both exactly the same...
But then I noticed that Smite had edited his entry! D'oh.
-
mcwebtree
- Seasoned User
-
- Posts: 165
- Joined: Thu Dec 22, 2005 4:11 pm
Registered Newsbin User since: 12/22/05
by Smite » Sat Mar 11, 2006 6:02 pm
Yeah. Thanks for the heads up.
Please read the
FAQ before asking any questions.
If you're new to newsgroups, and the files on them, you can find a very helpful guide
here.
-
Smite
- Katamari Damacy Addict
-
- Posts: 5318
- Joined: Sat May 19, 2001 1:54 am
- Location: Alberta, Canada
Registered Newsbin User since: 03/27/03
by bobkoure » Wed Aug 09, 2006 5:32 pm
While we're at it, there's a complete regex tutorial at Links not allowed for unregistered users.
-
bobkoure
-
by RevRagnarok » Wed Feb 25, 2009 11:29 pm
I have used
RegEx Coach when I am doing Perl development, I like the way it will walk you thru stuff.
-
RevRagnarok
- Occasional Contributor
-
- Posts: 35
- Joined: Thu Oct 20, 2005 8:18 am
Registered Newsbin User since: 10/20/05
-
by mbourgon » Thu Sep 01, 2011 5:17 pm
A waaaay late entry to the party.
You can also use \d instead of [0-9]. Saves a couple characters.
-
mbourgon
- Active Participant
-
- Posts: 55
- Joined: Wed Mar 27, 2002 12:59 am
Registered Newsbin User since: 03/04/02
by Quade » Thu Sep 01, 2011 5:38 pm
Never too late for RE's.
-
Quade
- Eternal n00b
-
- Posts: 44899
- Joined: Sat May 19, 2001 12:41 am
- Location: Virginia, US
Registered Newsbin User since: 10/24/97
-
by rh » Mon Feb 20, 2017 9:18 pm
Seems like a good place to share this. I don't use Regex enough to become very proficient, let alone master it. Recently I came across the free (with registration) tool below and I've used it a few times to test RE's that I use with NB. Took a tiny bit of time getting the hang of it and I hardly use its full potential, but It's real handy.
http://www.ultrapico.com/Expresso.htm
-
rh
- Seasoned User
-
- Posts: 301
- Joined: Sat Nov 27, 2004 4:02 pm
Registered Newsbin User since: 11/27/04
by dexter » Tue Feb 21, 2017 7:27 pm
Nice, good find.
-
dexter
- Site Admin
-
- Posts: 9511
- Joined: Fri May 18, 2001 3:50 pm
- Location: Northern Virginia, US
Registered Newsbin User since: 10/24/97
-
Return to Regular Expressions
Who is online
Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 2 guests