Hi, Dail, Aviv and All
Ah, yes ! I didn’t think about these four Scintilla commands. For further information :
http://www.scintilla.org/ScintillaDoc.html#Words
But there are some differences between the two methods :
My regex puts the caret AFTER the underscore character, whereas these commands place it BEFORE
The Scintilla SCI_WORDPART* commands put the caret at many more locations than my regex ! Indeed, it stops at each beginning and end of any range of word characters !
BEWARE : for people, who DON’T have an American standard keyboard, the default keys, associated with the CTRL key, may be completely different ! For instance, on my French keyboard, I must use :
The CTRL key and the / : key, for forward location
The CTRL key and the µ * key, for backward location
So, you’ll have to experiment some shortcuts, before finding the right one !. Of course, you may use the Shortcut Mapper to change these default shortcuts :-)
On the other hand, Aviv, may be, you’ll prefer this second regex, below :
(?-is)(?<=\l)(?=\u)|(?<=\W|_)(?=\w)|(?<=.)(?=\R)
Compared to my previous regex, it would put the caret, either :
Between any lower-case letter AND any upper-case letter
Between ( any NON-word character OR an underscore ) AND any word character
Between the last standard character, of a line and its End of line characters
Just try it, for instance, with the text below :
http://www.scintilla.org/ScintillaDoc.html#SCI_WORDPARTLEFTThen, if necessary, each word, located at right of the caret, can be selected with the CTRL + SHIFT + RIGHT shortcut
Best Regards,
guy038