I want to create a regex for the following scenario:
If the string contains a percentage character ( %), then it can contain only the following: %20and cannot be preceded by another. ' %'
So, if it were, for example %25, it would be rejected. For example, the following line is valid:
http://www.test.com/?&Name=My%20Name%20Is%20Vader
But this will not work:
http://www.test.com/?&Name=My%20Name%20Is%20VadersAccountant%25
%%%25
Any help would be greatly appreciated.
Kyle
EDIT:
The script in a nutshell is that the link is written in an encoded state, and then launched through JavaScript. Decoding operation is not performed. I tried decoding .net and JS decoding, each of which has the same result. Results remain encoded during execution.