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: Why isnt my regex matching anything?: Edit Log



guru_perl
Novice

Dec 19, 2010, 1:40 AM


Views: 2543
Why isnt my regex matching anything?

 
For the input line shown below,the regex is not matching,I couldnt find anything wrong?Need your input perl gurus

Code
INPUT LINE:.\\directory\programfiles\documents\data\lookup\file.c;//programfiles/documents/data/lookup/file.c - LABEL : 5 
if (my ($key, $value) = $line =~ /\.\\(.+?)-\d+;.+?;(.+?)\s-\s/) {
}

OUTPUT:-
KEY:\\directory\programfiles\documents\data\lookup\file.c
VALUE://programfiles/documents/data/lookup/file.c


(This post was edited by guru_perl on Dec 19, 2010, 2:16 AM)


Edit Log:
Post edited by guru_perl (Novice) on Dec 19, 2010, 2:14 AM
Post edited by guru_perl (Novice) on Dec 19, 2010, 2:15 AM
Post edited by guru_perl (Novice) on Dec 19, 2010, 2:16 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