Is the pattern not a python regex pattern?
Question about View.find/find_all pattern
facelessuser
#2
No, the API does not use Python as the regular expression engine. I think it’s boost?
2 Likes
prmaple
#3
Well, :shrug:
That’s why it requires a string, and can’t use any of (?x)
, (?P<..>)
, (?P=..)
, OK…
0 Likes
kingkeith
#4
view.find_all('(?x)(?<test>test)\g<test>')
works just fine, not sure why you’d want to restrict yourself to Python 3.3’s re
module’s limited functionality…
3 Likes
FichteFoll
#5
St uses boost pretty much everywhere it doesn’t need backwards compatibility with old textmate resources (tmPreferences, syntax definitions).
2 Likes
dirktay
#8
Here’s a quote from docs.sublimetext.info for Search and Replace:
Sublime Text uses the Perl Compatible Regular Expressions (PCRE) engine from the Boost library to power regular expressions in search panels.
Here’s the link:
https://www.boost.org/doc/libs/1_69_0/libs/regex/doc/html
0 Likes