I have a relatively complicated string that has been outputted from another piece of software. It is as follows:
tstring = “12A/Ma1 $GJG (#G25)”
I would like to extract into a simple array
[“Ma”,”GJG”, “G25”]
in particular
[‘the first two characters after the /’, ‘the characters after $ before the next space’, ‘the contents of the bracket without the #’]
Every time I look at a regex expression it seems so complicated and I don’t know how to structure this. Would anyone be able to help?
Thanks
I’ve tried to do it as I would in excel, with all kinds of find and match constructions, but feel like regex is a better option.