E
Eric
I have a string that contains tokens surrounded by percentage signs,
e.g. %token1%
I want to return any instance of a token that is not surrounded by
single quotes. For example:
Using the input string: "This is %token1% and here is '%token2%'."
I want to match "%token1%" but not "%token2%".
My match pattern is: "[^\x27a-zA-Z0-9]%[^%]+%[^\x27a-zA-Z0-9]"
If my input string is: "This is %token1% and here is '%token2%' and
also (%token3%)."
I am getting back "%token1%" and "(%token3%)".
Why am I getting back round brackets around %token3%? How can I still
get back %token3%, but without the round brackets?
Thanks,
Eric
e.g. %token1%
I want to return any instance of a token that is not surrounded by
single quotes. For example:
Using the input string: "This is %token1% and here is '%token2%'."
I want to match "%token1%" but not "%token2%".
My match pattern is: "[^\x27a-zA-Z0-9]%[^%]+%[^\x27a-zA-Z0-9]"
If my input string is: "This is %token1% and here is '%token2%' and
also (%token3%)."
I am getting back "%token1%" and "(%token3%)".
Why am I getting back round brackets around %token3%? How can I still
get back %token3%, but without the round brackets?
Thanks,
Eric