nmerriweather has asked for the wisdom of the Perl Monks concerning the following question:
However, that could match some unwanted things, so I updated it... This works (limit out their index and browse page ):my $RE_myspace_user= qr/myspace\.com\/([\d\w]*)(:?\/|$)/;
But thats' messy - sure they only use index.cfm, but something would be better to block all .cfm pages, so... This doesn't work:my $RE_myspace_user= qr/myspace\.com\/[^(?:index\.cfm|browse)([\d\w]*) +](:?\/|$)/;
it just generates an erro i guess i can't put a character class in that nesting, which is fine -- does anyone have a suggestion to approximate it though?my $RE_myspace_user= qr/myspace\.com\/[^(?:[\w\d\_]\.cfm|browse)([\d\w +]*)](:?\/|$)/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regex grouping issue
by Fletch (Bishop) on Aug 31, 2006 at 19:14 UTC | |
by nmerriweather (Friar) on Aug 31, 2006 at 19:21 UTC | |
by japhy (Canon) on Aug 31, 2006 at 20:28 UTC | |
|
Re: regex grouping issue
by Velaki (Chaplain) on Sep 01, 2006 at 10:40 UTC |