in reply to Re: pattern matching question
in thread pattern matching question

thank you Kennethk. A follow up question. I am reading that the ^. is a metacharacter to indicated beginning of the string. So is if the variable is:

hostname.ms.com

is the ^. ignoring the "hostname" part of the string and just picking up the " .ms.com "? Also, why does the ^. have to be in brackets?

Replies are listed 'Best First'.
Re^3: pattern matching question
by choroba (Cardinal) on Jul 20, 2011 at 15:36 UTC
    On the first position inside square brackets, ^ has a different meaning: it is a negation. So, [^.] means anything but a dot.