Link to home
Start Free TrialLog in
Avatar of masterorb
masterorb

asked on

ColdFusion REFind -- why no match?

Hello, I'm trying to test against the CGI.REQUEST_URI variable to see if it is in the format "/backend/<some_sub_folder>/index.cfm".

I tried to do this is ColdFusion with REFind function:

<cfif REFind("/backend/\w/index.cfm", CGI.REQUEST_URI) IS NOT 0>
      <!--- execute code --->
</cfif>

But that does not work.  When I dump the value, I do find that it is:

/backend/animations/index.cfm

So it should match. Can anyone help?

Thanks!
Avatar of black0ps
black0ps
Flag of United States of America image

Try
<cfif REFind("/backend/(\w)/index.cfm", CGI.REQUEST_URI) GT 0>
      <!--- execute code --->
</cfif>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of black0ps
black0ps
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial