Forum Moderators: coopster & phranque

Message Too Old, No Replies

help w/ Regular Expression

         

rcjordan

5:33 pm on Apr 13, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If I need to search for any 1 of 6 variations below of com coming at or near the end of line ($)

com
com>
com)
com"
com">
com")

Would the following do it? Seems so clunky.

com($¦>$¦\)$¦"$¦">$¦"\)$)

in WebmasterWorld board code, ¦ = pipe

rcjordan

7:10 pm on Apr 13, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This seems to work, allowing between 0 and 3 characters between the com and end of line and, if it's 3 characters, the 1st of the 3 can't be "."

com(¦.¦..¦[^.]..)$

bird

10:49 pm on Apr 13, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



com"?[)>]?$

  • "? - match zero or one double quote
  • [)>]? - match zero of one character out of ) and >
  •