regex - I am new to Regular Expressions . Why isn't this match working in Perl? -


this code :-

$_ = " 511 1 1 ;"; $line = "511 1 1";  if(m/" ".$line/){        print "reached\n"; } 

i want match occur it's not happening. thanks.

/" ".$line/ matches literal " " char except newline (.) , 511 1 1

you want / $line/


Comments

Popular posts from this blog

java - Incorrect order of records in M-M relationship in hibernate -

command line - Use qwinsta in PowerShell ISE -

php - I want to create a website for polls/survey like this http://www.poll-maker.com/ -