Hopefully this is easy but I have been fighting with this for a while
I am looking to write a regex for UDP transform that returns the last 4 digits/numbers
e.g. A001234A00987 would transform to 0987
I have tried a few things but nothing provides the correct result. The closest I got was
parse(.+\w+(?<result>\d\d\d\d),{poller}) which for the above example gave 987 but this is neither clean nor returns the 0 before 987
In PHP this would simply be written \d{4}$ but entering parse((?<result>\d{4}$),{poller}) gave an error.
Is there a better way this can be written to give me the last four?