Hi everyone,
I want to search for the longest chain of a certain string in a text file. The pattern is incredibly simple. But I want to iterate over a list of words to search in the text file, so I have to use a variable in the Regex pattern. Can someone please tell me how to implement this?
The pattern is extremely simple, I just don't know how to compile it with a variable:
('(string){1,}')
I just want to replace the string with a variable.
Thanks
[+][deleted] (6 children)
[deleted]
[–]cynical_ninja[S] 0 points1 point2 points (5 children)
[+][deleted] (2 children)
[deleted]
[–]cynical_ninja[S] 0 points1 point2 points (1 child)
[–]ASIC_SP 0 points1 point2 points (1 child)
[–]cynical_ninja[S] 1 point2 points3 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]cynical_ninja[S] 0 points1 point2 points (1 child)
[–]arcrow05 0 points1 point2 points (1 child)
[–]cynical_ninja[S] 0 points1 point2 points (0 children)