SAS正则表达式字符串

时间:2018-08-31 15:54:38

标签: regex sas pcre

我对以下代码有疑问。 如果它有\ s \ S \ S $,它是否正在寻找类似“ NJ $”的东西?我还没有看到\ S $。除非,这是字符串中的实际美元符号。

也位于^。(\ s \ S \ S $)。 $ / $ 1。这是在寻找字符串的开头,例如:“ NJ $”吗?我不确定。* $ / $ 1在做什么。我是SAS的正则表达式新手。

    if prxmatch('/\s\S\S$/',strip(claim_txn_merchant_clean)) then 
            do;
                claim_state = strip(prxchange('s/^.*(\s\S\S$).*$/$1/',-1,strip(claim_txn_merchant_clean)));
                claim_txn_merchant_clean = prxchange('s/\s\S\S$/$1/',-1,strip(claim_txn_merchant_clean));
            end;

0 个答案:

没有答案
相关问题