Hi,
I need to use SAS regular expression to extract a substring from some messy strings. I've compiled regular expression patterns but not quite sure how to do that in SAS.
The examples are as follows:
Have | Want |
a2191625zex-10_14.htm | 10_14 |
ade4378dexhibit10_2.txt | 10_2 |
The regular expression I come up with is (ex\D*)(\d+\D+\d*)
I am using two sets of brackets here to group. In Python or other languages, I can locate what I want by identify group(2). Is there any similar function here in SAS?
I would be very grateful if someone can help out here.
Thanks,
Dara