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!
masterorbAsked:
Who is Participating?
 
black0psCommented:
You can also try
<cfif REFind("/backend/(\w)*.?/index.cfm", CGI.REQUEST_URI) IS NOT 0>
      <!--- execute code --->
</cfif>

Open in new window

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

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.