in reply to regexp question

Regex special characters act differently when they are within a bracketed character class, and many of them (including .) no longer have a special meaning there. See "Special Characters Inside a Bracketed Character Class" in perlrecharclass for the full list.

Replies are listed 'Best First'.
Re^2: regexp question
by ramprasad27 (Sexton) on Oct 28, 2011 at 07:13 UTC
    isnt that confusing as to what special variables have (no special/special) meaning inside character class? isnt this that makes perl look ugly some times?

      Maybe a little at first, but you'll quickly get used to that after looking at enough regular expressions. Besides, as johnny_carlos mentioned above, some of the special characters wouldn't make sense when you think of them as part of a character class.