Matching Word with regular expression
- by lbar
I have the following text file:
...
"somewords MYWORD";123123123123
"someother MYWORDOTHER";456456456456
"somedifferent MYWORDDIFFERENT";789789789
...
i need to match the word MYWORD, MYWORDOTHER, MYWORDDIFFERENT and then substitute the space before this word with ";".
Someone can figure out a regex?
I have done something like that:
+[^ ][^ ][^ ][^ ][^ ][^ ][^ ]";
but this works only with a specific word lenght. I need to modify to get any word of any leght.
Any help?
Thank you.