I'm using a .NET regex checker, http://regexstorm.net/tester
to test a string to match acronyms
(?<=\s|^)((?:[a-zA-Z]\.){2,})(?=[[:punct:]]?(?:\s|$))
Away from keyboard is shortened into A.F.K.
The online tool correctly match A.F.K.
But the C# does not!
var regex = new Regex(@"(?<=\s|^)((?:[a-zA-Z]\.){2,})(?=[[:punct:]]?(?:\s|$))");
var match = regex.Match("Away from keyboard is shortened into A.F.K.");
if(!match.Success)
throw new NoMatchException("no match found"); // throws