Can Regex be used to find a pattern for a file?