Editor.findText(flags, start, end, ft) → object¶
Find some text in the document.
See Scintilla documentation for SCI_FINDTEXT
http://www.scintilla.org/ScintillaDoc.html#SCI_FINDTEXT calls it "int searchFlags" and poking around the page I see these flags: SCFIND_MATCHCASE SCFIND_WHOLEWORD SCFIND_WORDSTART SCFIND_REGEXP SCFIND_POSIX but I can't use those directly in the command,
myFind = editor.findText(SCFIND_REGEXP,0,endPos,"\t")
Traceback (most recent call last):
File "<console>", line 1, in <module>
NameError: name 'SCFIND_REGEXP' is not defined
How do I use these flags?
Thanks,
Jentron
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Great, thanks! A lot more readable than editor.findText(0x00600000,...)
:D
The Scittilla says SCFIND_POSIX Treat regular expression in a more POSIX compatible manner by interpreting bare ( and ) for tagged sections rather than ( and ). So it should change the behavior of parenthesis?
I noticed when the Boost regex engine was updated that dots "." now need to be escaped in the replace string "."
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
http://npppythonscript.sourceforge.net/docs/latest/scintilla.html?highlight=findtext#Editor.findText tells me the first field is 'flags'
http://www.scintilla.org/ScintillaDoc.html#SCI_FINDTEXT calls it "int searchFlags" and poking around the page I see these flags: SCFIND_MATCHCASE SCFIND_WHOLEWORD SCFIND_WORDSTART SCFIND_REGEXP SCFIND_POSIX but I can't use those directly in the command,
How do I use these flags?
Thanks,
Jentron
The flags you want are in FINDOPTION, which has the options WHOLEWORD, MATCHCASE, WORDSTART, REGEXP and POSIX (although POSIX should have no effect).
e.g.
It'd be great if the documentation included references to which flags are used in which calls - I'm sorry they don't at the moment.
Cheers,
Dave.
Great, thanks! A lot more readable than editor.findText(0x00600000,...)
:D
The Scittilla says SCFIND_POSIX Treat regular expression in a more POSIX compatible manner by interpreting bare ( and ) for tagged sections rather than ( and ). So it should change the behavior of parenthesis?
I noticed when the Boost regex engine was updated that dots "." now need to be escaped in the replace string "."