Sublime Forum

Get all of the region objects associated with a word

#1

How do I get a list of all the region objects that are associated with one particular plain word in the current buffer ?
(For example, if the current buffer has the word “Bob”, I want to get all the region associated with “Bob”)
Thank you.

0 Likes

#2

What does “associated” mean? Do you want to get all regions that is “Bob”?

view.find_all(r"\bBob\b")
1 Like