user30771 user30771 - 2 years ago 71
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 ([]).

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download