I am trying to match all the words in the sentence:
"That's the password: 'PASSWORD 123'!", cried the Special Agent.\nSo I fled.
I tried:
([A-Za-z\d(^\n$)]+('[A-Za-z]+)?)
but I don't want to match \nSo as a word. Only So. As a matter of fact, I want to exclude all forms of white space like \n or \t.
My Julia code is:
sentence = """"That's the password: 'PASSWORD 123'!", cried the Special Agent.\nSo I fled."""
regex = r"([A-Za-z\d(^\n$)]+('[A-Za-z]+)?)"
v =[m.match for m = eachmatch(regex, sentence)]