This is the regular expression I was using for this piece of text:
(?![!',:;?\-\d])(\w[A-Za-z']+)
The flavour of regexp is ECMAScript (JavaScript)
The sample text:
This.Sentence.Has.Some.Funky.Stuff.U.S.S.R.Going.On.And.Contains.Some. ABBREVIATIONS.Too.
This.Sentence.Has.Some.Funky.Stuff .U.S.S.R. Going.On.And.Contains.Some. ABBREVIATIONS.Too.
A.S.A.P.?
Ctrl+Alt+Delete
Mr.Smith bought google.com for 1.5 million dollars, i.e. he paid a lot for it. Did he mind? A.d.a.m Jones Jr. thinks he didn't. In any case, this isn't true... Well, with a probability of .9 it isn't. Mr. John Johnson Jr. was born in the U.S.A but earned his Ph.D. in Israel before joining Nike Inc. as an engineer! He also worked at craigslist.org as a b c d e F G H I J business analyst.
It's doing everything I want but I can't also finish the regexp to match the single letters to a b c d e F G H I J where it's [a-zA-Z] in regexp terms.
I don't want the text such as U.S.A to be matched and this is where I'm having trouble.
I've tried the solution here How to include character in regular expression but I couldn't get that to work due to the more complex nature of my issue.
My mission here is to wrap the matching items with anything.
Here's the link for the same regular expression example: https://regex101.com/r/Qdq4AY/4
\.?[a-zA-Z](?:\.[a-zA-Z])+\.?|\.[a-zA-Z]\.|(?!\d)(\w[A-Za-z']*)regex101.com/r/8O8GG6/1aanda b c d e F G H I J. I don't want to removeU.S.A. yet not match them.