Forum Moderators: open

Message Too Old, No Replies

regex writing help

         

syktek

9:18 pm on Feb 13, 2007 (gmt 0)

10+ Year Member



looking to write a regular expressions that checks:
<? but if <?php appears send alert.

var validate= /^[\<\?][^\<\?php]*$/

isn't working, hopefully someone can help me in the right direction.

TIA

syktek

2:22 am on Feb 14, 2007 (gmt 0)

10+ Year Member



so i was looking into this a little more and thought maybe i could use <?[^pP] but that doesn't seem to help...grrr

eelixduppy

2:36 am on Feb 14, 2007 (gmt 0)



Try something like this as the pattern:

/<\?php/

If a match comes back, send alert.