user30771 user30771 - 1 year ago 64
Perl Question

Perl what does " :\- " match?

I have the following regex:


I can't match the ":\-", already did searches on internet and tryed severel combinations...

Answer Source

You are trying to match just one character out of three possible: a space type character (\s), a colon (:) or a minus (-).

What you are looking for is a regex like /\s:\-/ without the brackets ([]).