[21:23] Timwi: Can you think of more than three very common cases in which two slashes ('//') might come up in succession? :-) (random quiz
( Read more... )
It does? I thought that the regular expression // was special and stood for "the last successfully matched regular expression". So you could have:
'hello' =~ /[aeiou]/; # true 'goodbye' =~ //; # also true 'HAPPY BIRTHDAY' =~ //; # false: no lower-case vowel in that string
(Not sure what happens if there is no previous successfully matched pattern... *checks perlop* ah, then it acts as an empty string, which will always match.)
Comments 2
It does? I thought that the regular expression // was special and stood for "the last successfully matched regular expression". So you could have:
'hello' =~ /[aeiou]/; # true
'goodbye' =~ //; # also true
'HAPPY BIRTHDAY' =~ //; # false: no lower-case vowel in that string
(Not sure what happens if there is no previous successfully matched pattern... *checks perlop* ah, then it acts as an empty string, which will always match.)
Reply
Reply
Leave a comment