Replaced my own function to String.PatternSafe() (didn't know about it :( )