in reply to Re: Substring Syntax Check
in thread Substring Syntax Check

/ has a special meaning in regular expressions

No, it doesn't.

$ perl -le' $_ = "one/two/three/four"; print m,/, ? "true" : "false"; $re = "/"; print $_ =~ $re ? "true" : "false"; ' true true

Only ?, *, +, [, {, (, ), | and . have special meaning in a regular expression.

Replies are listed 'Best First'.
Re^3: Substring Syntax Check
by ikegami (Patriarch) on Sep 27, 2008 at 03:55 UTC
    ack, the post originally said | was special, cause I thought the OP said |. I fixed the post rather blindly. True, / is only special if / is the delimiter.
      That hood sometimes gets in the way :)