Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: regex help

by andrew (Acolyte)
on Sep 27, 2002 at 21:24 UTC ( [id://201354]=note: print w/replies, xml ) Need Help??


in reply to regex help

Alright

$a =~ s|/browse(/.*/)|$1|i; $a = $1;

That seems to work :), but what if the url conatins '\' instead of '/' like how could I check for both.

Replies are listed 'Best First'.
Re: Re: regex help
by fglock (Vicar) on Sep 28, 2002 at 05:07 UTC

    '\' or '/' is written like tihs:

    [\\\/] or: [\/\\] so you get: $a =~ s|[\/\\]browse([\/\\].*[\/\\])|$1|i;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://201354]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (1)
As of 2024-04-19 00:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found