Copy link to clipboard
Copied
I have cgi.path_info that is always formatted like this
/data/show/80865
How do I get the ALWAYS numeric value after show/
For example, in this case, I want to get the 80865 value.
1 Correct answer
This can easily be done, if you treat the value as a list with / being the delimiter.
<cfset variables.thisNumber = ListLast(cgi.path_info,'/') />
HTH,
^ _ ^
Copy link to clipboard
Copied
This can easily be done, if you treat the value as a list with / being the delimiter.
<cfset variables.thisNumber = ListLast(cgi.path_info,'/') />
HTH,
^ _ ^
Copy link to clipboard
Copied
As always, thank you.
Copy link to clipboard
Copied
Thank you for marking my answer as correct. I do appreciate it.
V/r,
^ _ ^
BTW.. for anyone who likes complex for the sake of complexity you can use RegEx.
<cfset variables.thisNumber = REmatch("\d+$",cgi.path_info)[1] />

