quick question. I have a random string, something like this:
"country=='CANADA'&&(role=='MANAGERL1'||role=='ADMIN'||role=='LOC_IND')&&Age>67"
I need to find and replace each substring that matches this pattern "role=='ROLENAME'" into
roles.indexOf('ROLENAME'), so in this example it I want to get a new string:
"country=='CANADA'&&(roles.indexOf('MANAGERL1')>=0||roles.indexOf('ADMIN')>=0||roles.indexOf('LOC_IND')>=0)&&Age>67"
How can I do this in C#, I mean using Regular Expressions (RegEx) ? What should be the regex expression? And if you know the shortest way to do the replacement, it would help a lot.
Thanks.