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: [shawnhcorey] Lookahead doesn't work: Edit Log



damluar
New User

Jan 10, 2010, 8:26 AM


Views: 4495
Re: [shawnhcorey] Lookahead doesn't work

Thank you for your help. I need to find only strings that contain Paris at the beginning and do not contain 1/5 and 5/5.
I made it this way:
if (/\AParis/){
if ($_ !~ /(5\/5|1\/5)/){
$line_counter++;
print $_, "\n";
};
}

but how can I combine this 2 expressions? I thought that I could use negative lookahead...


(This post was edited by damluar on Jan 10, 2010, 8:26 AM)


Edit Log:
Post edited by damluar (New User) on Jan 10, 2010, 8:26 AM


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

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