string – converting the SQL regexp to sas prxchange

I have a SQL code with some lines of REGEXP_REPLACE function to clean a string. I am trying to re-write the code in SAS using the PRXCHANGE function. However having problem understanding what the patterns mean in SAS. could anyone help on translating the pattern to SAS version.

REGEXP_REPLACE(string,'([0-9]+[/][0-9]+[/][0-9]+|[#][A-Z0-9]+|ON.*|[\d]+\s+[\d]+\s+[\d]+)','','inm')

or

REGEXP_REPLACE(full string,'(ON[0-9]+[/][0-9]+[/][0-9]+|REF [#][A-Z0-9]+)|ON.*','','inm')

In SAS I tried PRXCHAGNE("s/(same pattern as SQL)//in", -1, full string) which gave me error due to invalid character. Potentially pattern in SQL is not readable by SAS and need to be revised. Your help is appreciated in advance.

Read more here: Source link