D
D
dr0zd02020-07-05 22:39:54
Python
dr0zd0, 2020-07-05 22:39:54

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

1 answer(s)
S
soremix, 2020-07-05
@dr0zd0

import re
re.findall(r'\[\w+', s)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question