Hi Madhura,
Use replaceAll(). The original string, with all occurrences of the regular expression replaced by the replacement string.
If the regular expression does not occur in the string, the original is returned.
ex,
replaceAll('this @string ##', '^([0-9]+)$', ' ') will return → ‘this string ‘
This may help you!
Hi Madhura,
I would use a regex in a combination with toLowerCase for this
toLowerCase(replaceAll($Name,'\W++',''))
where $Name is the attribute that you want to sanitize and '\W++' matches one or more non-word characters. For more information see https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html
and https://docs.mendix.com/refguide/string-function-calls/#13-replaceall and https://docs.mendix.com/refguide/string-function-calls/#11-trim
Hope this helps,
I am getting this two errors while using replaceAll function.