How I create a regular expression to find lines of code that contain cflocation but do not contain addtoken?
I need a regular expression that will find lines with:
<cflocation url="index.cfm" addtoken="No">
but without the addtoken
<cflocation url="index.cfm">
The index.cfm can be any web address
I also added a comment below but this is for my text editor so I can search in files for 开发者_StackOverflow中文版all cflocation tags that are missing addtoken.
Thanks!
Try <cflocation\s+url="[^"]*"\s*>
You can test out regex's with data at regexpal.com.
You can use strfriend.com to explain regex's, an example output for the regex above is given below:
精彩评论