Regex pattern returns null for variable as pattern
Regex pattern returns null for variable as pattern Question: I am reading regex pattern from a .txt file and passing it as a variable and using it to search in a very big text file. However, variable passing in regex search didnt work. My code snippet is with open(r"C:Desktoplist_pattern.txt", "r") as file1: for pattern in …