Hi,
I have a requirement of passing certain characters in the expression. It should pass Numbers, Alphabets, certain special characters and Latin characters.
The code is as below:
If
REGEX_MATCH([FIELD],'[A-Za-z0-9\.\·\`\ \\n\,\-\\ÀÈÌÒÙàèìòùÁÉÍÓÚÝáéíóúýÂÊÎÔÛâêîôûÃÑÕãñõÄËÏÖÜŸäëïöüŸ¡¿çÇŒœßØøÅåÆæÞþÐð]+') = 0
then
'F'
else
'T'
endif
I have entered '\n' as in the list of allowable characters but the code is still catching New line characters as exceptions.
Any thoughts or inputs are appreciated.
Thank you.
Looks like you have to backslashes before the n `\\n` ... this would just include a "\" or an "n".
Something like this might work,
If REGEX_MATCH([FIELD],'[-A-Za-z0-9.·`\n,ÀÈÌÒÙàèìòùÁÉÍÓÚÝáéíóúýÂÊÎÔÛâêîôûÃÑÕãñõÄËÏÖÜŸäëïöüŸ¡¿çÇŒœßØøÅåÆæÞþÐð]+')
then
'T'
else
'F'
endif
I think the only backslash you need in there is the one for "\n".
This also might be simpler and do the same job,
If REGEX_MATCH([FIELD],'[\w\n\s.·`,-]+')
then 'T' else 'F' endif
@JHAROHIT
try this
If REGEX_MATCH([FIELD], '[\w.\·\s,\\\-À-ÿ¡¿çÇŒœßØøÅåÆæÞþÐð]+') = 0 then 'F' else 'T' endif