Hi
This reg exp search correctly checks to see if a string contains the text harry:
re.search(r'\bharry\b','[harry] blah',re.IGNORECASE)
However, I need to ensure that the string contains [harry]. I have tried escaping with various numbers of back-slashes:
re.search(r'\b\[harry\]\b','[harry] blah',re.IGNORECASE)
re.search(r'\b\\[harry\\]\b','[harry] blah',re.IGNORECASE)
re.search(r'\b\\\[harry\\\]\b','[harry] blah',re.IGNORECASE)
None of these solutuions work find the match. What do I need to do?
Thanks!