I have this string value
var x = '/index.cfm?act=page1.showdata';
want to extract page1
if i had to use it as simple, i am use contains to find it and make it work, but i really want to use regex to find that value and put it into a variable,
using coldfusion
No need for regex. Every query string parameter is available in the url
scope. They're all already variables.
<cfdump var="#url#">
This dumps a struct whose keys are the parameters.
So the CF variable url.act
has a value (string) of page1.showdata
.
What else do you need than that?