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

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -