Case: To accept person_name satisfying following criteria:
Some pre-calculation has been performed to store the name in the string "PERSON_NAME"
LOGIC: SUBSTR(REGEXP_REPLACE(PERSON_NAME,'[^A-Za-z .`''-]+',''),0,50)
SELECT SUBSTR(REGEXP_REPLACE('cafè','[^A-Z|a-z| |.|`|''|-]+'),0,50)
FROM dual;
Passing almost all cases except in case of accented characters:
For example:
Expected result: cafè [ie symbol above e ` should not be filtered out]
Actual Result: caf
You can use :
select SUBSTR(REGEXP_REPLACE('cafè-` t *'' {','[[:digit:]]') ,0,50) as "String"
from dual;
String
--------------
cafè-` t *' {
since there's no information about numeric expressions in your restriction list.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.