How to search " special character inside a string ? Using Regex Search the pattern is not allowing, if " needs to be checked in a given string
Any help would be appreciated.
Hi Kunal,
Try this regex expression . Its a negative match of special characters
[^A-Za-z0-9]
You can test in below online sites
https://regex101.com/
https://regexr.com/
Best Regards
Devendra
whenever you want to specify a " in a string literal in OS, you can do that by using "". (So not only for Regex)
For example, if you want to specify a regex pattern to search for the occurence of "id" in a string, you would use this as literal for your pattern:
"""id"""
Dorine
Hi Kunal,I have created a demo application for above issue you have raised .Please check by below URL and find attached OML file.
https://rahul-jain-doitlean.outsystemscloud.com/Application/regex
Hope this will help you :)Rahul Jain
Actually depends on your exact requirement. Like if you need to search for any special character is there or not can use regex as suggested above.
But if you want to search only for 1 or 2 special character then I think String's index Of method can be used.
If you just want to find any special character in string use Index() in IF condition. Eg. if want to find "&", following can be used with if condition :
Index(yourString,"&",0,False,False) > 0
if want to find and replace, use Regex_Replace() action.
cheers