[Xitami] Regular Expression escaping?

Bob Paddock xitami@lists.xitami.org
Thu, 06 Dec 2001 11:49:29 -0500


I want a form that will let me enter Regular Expressions, then pass to PHP's egrepi function.

If I enter some thing like "^062\b" when I submit it I end up with "^062\\b" (note the double slash).

Can some one tell me who is doing me this favor of escaping things for me, and how do I prevent it?


    <FORM method='post' action='pbsearchresult.php'>
      <INPUT type="hidden" name='cmd' value='search'> <INPUT type=
      "text" name='data' value='^062.* 8.*MHz'> <INPUT type="submit"
      name='do' value=
      'Search with (POSIX-style) regular expression'><BR>
    </FORM>

    echo "You are searching for <B>$data</B>:<BR>\n";