regex - How do I match a string that does not contain X with ColdFusion regular expressions? -


I asked before, but got a negative vote, so I'm rewording it. I have:

  & lt; Cfset myExpression = "X" & gt; #REFind (myExpression, myString) #  

I need to change my expression so that it returns a value other than zero if there is no x in my string, and 0 if any x mystring In.

  & lt; Cfset string = "abc" /> & Lt; Cfoutput & gt; #refind ("^ [^ X] + $", string) # & lt; / Cfoutput & gt; // 1 & lt; Cfset string = "abcX" /> & Lt; Cfoutput & gt; #refind ("^ [^ X] + $", string) # & lt; / Cfoutput & gt; // 0  

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -