Replace string / Regex

I’m trying to clean up an identifier column with a prefix at the start of the string. For example,

a) AB1001
b) BAC1002
c) AA102E

a) 1001
b) 1002

I couldn’t find a regex function in QuickSight to do this (i thought this is a very basic function). The alternative is to use the ‘replace’ function, but I have over 20 prefix combinations so it is not efficient.

I also don’t have access to the SQL to use regexp_replace.

Appreciate it if anyone has a solution to this? Thanks.

@te_sheng Im not a regex expert, but how would you do this in regex? What kind of pattern should we look for? Could we always grab the last 4 characters?

i would just need to extract the digit. The expression would likely be ^\d+

I will flag this as a feature request as it would be very helpful besides your use case.