I want to get everything in the square brackets in this phrase, including the brackets:
“Abcd [in brackets] xyz”
I have tried this:
re.search(r’.[.])’)
but it doesn’t give what I am looking for, not sure how to match the second bracket
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The regex expression you need is something like:
See a demo of the above expression.
You will need to adapt it depending on your programming language.
re.search(r'.[.])')appears to be python, so try: