CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Regular Expressions: Re: [bobt_1234] Greedy expression doesn't work like I expect: Edit Log



wickedxter
User

Jan 31, 2013, 6:18 PM


Views: 11228
Re: [bobt_1234] Greedy expression doesn't work like I expect


Code
my $line = "/document/trial_date"; 

$line =~ /.+\/(.+)$/;

print $1;


this worked for me.. regex's are greedy


(This post was edited by wickedxter on Jan 31, 2013, 6:22 PM)


Edit Log:
Post edited by wickedxter (User) on Jan 31, 2013, 6:18 PM
Post edited by wickedxter (User) on Jan 31, 2013, 6:22 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives