In order to match a string in a multiline string use the 'm' modifier.
For Ex:
The string is: "Hello wassup\n How u doing\n goaway"
and we have to match "How u doing", it cant be match the same way as perl doesn't check after newline if we dont tell it to.
So use:
$string =~ /How u doing/m
Continue with the perl regex ....... cheers!!!
For Ex:
The string is: "Hello wassup\n How u doing\n goaway"
and we have to match "How u doing", it cant be match the same way as perl doesn't check after newline if we dont tell it to.
So use:
$string =~ /How u doing/m
Continue with the perl regex ....... cheers!!!
No comments:
Post a Comment