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 | |
by karlgoethebier (Abbot) on Nov 18, 2012 at 14:58 UTC |