I have a problem with my RegExp.
I need to replace some URLs with other URLs. I am using a URL-rewrite filter). The problem is that when the RegExp match just parts of the string, it does a replace anyway. I want it to only replace if it matches the entire targetstring.
Target strings might be like this:
1: /news/public.asp?myid=1234
2: /justadirectory
3: /justadirectory/
4: /justadirectory/something
5: /justafile.html
6: /directorywhith.dot
7: /directorywhith.dot/
If I make a RegExp like this:
(/[a-z]{3,20}/?)
It matches targetstring 2 and 3, but it also matches parts of the other strings.
Is there any why to say that it needs to match the entire string to do the replace, otherwise don’t replace the parts that you do math?