Joe_Pipitone
Mar 02, 2011Nimbostratus
Regex
I've been requested to perform a rewrite / redirect which does the following:
http://subdomain.ourcompany.com/webext/01.aspx?status=error (pass the 01 over to the url below and say id=thatNu...
For this:
http://server/webext/123.aspx?status=error
idxStart would be where the "1" is and idxEnd would be where the "3" is. The string range will then return "123"
For
http://server/webext/123456789.aspx?status=error
idxStart would be the "1" and idxEnd would be where the "9" is. The string range will then return "123456789"
Keep in mind that this does no validation that what's in the URI in that section is actually a number. For
http://server/webext/foo/bar/yahoo.aspx?status=error
The extracted ID would be "foo/bar/yahoo". But I'm assuming that you know the format of the application. You might want to thrown in a verification check in there.
-Joe