Move newlineRegex to helper class
Use contain instead of contains