in reply to Check if one string is a substring of another.

That's what the index function is for. As long as you are comparing fixed strings then using regular expressions is overkill. Stick with index.

--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

  • Comment on Re: Check if one string is a substring of another.