Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Question on Regex

by karlgoethebier (Parson)
on Nov 18, 2012 at 14:00 UTC ( #1004415=note: print w/replies, xml ) Need Help??


in reply to Question on Regex

Hello, perhaps this helps.

#!/usr/bin/perl use strict; use warnings; my $string = qq (.co.uk/Jobs/Company-Sector/C8A6446X4PND86M9WYJ/Tradew +ind/?APath=2.21.0.0.0); $string =~ m/.+\/.+\/.+\/(.+)\/.+/; print $1;

Update: I did not count right, sorry...

$string =~m/.+\/.+\/.+\/.+\/(.+)\/.+/;

Regards, Karl

«The Crux of the Biscuit is the Apostrophe»

Replies are listed 'Best First'.
Re^2: Question on Regex
by Anonymous Monk on Nov 18, 2012 at 14:29 UTC

    Thanks Karl, Got it... :)

      Yes, i know that i tend to sink before i type. But i'm working hard to get better ;-) Regards, Karl

      «The Crux of the Biscuit is the Apostrophe»

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2016-09-25 21:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (473 votes). Check out past polls.