Given a form number like:
ABC_12345_Q-10
I want to end up with:
ABC12345
So I need to find the position o
Easier solution in XSLT 2.0:
codepoints-to-string(reverse(string-to-codepoints(
substring-before(
codepoints-to-string(reverse(string-to-codepoints($s))), '_'))))
With 'substring-before' you will get everything after the last occurrence of your delimiter (the underscore). If you use 'substring-after' instead, you will get everything before the last occurrence of your deliminator.