Categories
How to find all words that have a square bracket?
How can you find all words in Python that start with a square bracket ("[")?
Answer the question
In order to leave comments, you need to log in
import re re.findall(r'\[\w+', s)
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question