FYI, in the Perl world it is very common to find that – for your convenience – a library will accept either a string-pattern or a regular expression as an argument. Regular expressions, as haukex just demonstrated, are by far the most powerful alternative.