I have strings which contains certain words with the following form:
'something1__something2__need'
for example here is a full string with those words:
'bla__wewe__23,sad__fd__sas po__oop__retq2'
I want to extract a new string with only the last sub-word in each word in the string, meaning that my first example turns into 'need' and the second into '23,sas retq2'. Possible delimiters are spaces and commas. Should be without loops if possible.
_([^_,]+)([,\s]|\Z)your result is in the first capture group. Paste it here with your testdata to get an explanation: regex101.com