I'm just started to look at regular expressions, and trying the tutorial at http://www.regular-expressions.info/tutorial.html , but that first test-search doesn't work in np++... ("Now try to search using the regex reg(ular expressions?|ex(p|es)?) This regex will find all names, singular and plural, I have used on this page to say 'regex'.")
Other, more simple, examples I tried with np++ works.
That tutorial is written by the author of EditPad Pro (in which the above search works) - is he making use of some non-standard/windows only implementations? (If there is such a thing... ?)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Notepad++ uses Scintilla component. Scintilla component has its own implementation of regular expressions, which is a (very) small subset of features supported by POSIX regular expressions.
Why not just implement full POSIX expressions?
Now i have top open up another editor each time i want to work with regular expressions, since most semi-advanced features don't work, or not as expected.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Interesting, is it possible to implement a powerfull regex engine like PCRE as a plugin? All that needed for that is to get the text in editor as a long zero-terminated string... But it's not possible in scintilla afaik? Only possiible to copy whole the text to a temporary buffer, but for big files it'll be slow and consume a lot of memory... Or to change PCRE routines so that they use scintilla's Accessor* clases to get characters from the editor...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
reg(ular expressions?|ex(p|es)?)
I'm just started to look at regular expressions, and trying the tutorial at http://www.regular-expressions.info/tutorial.html , but that first test-search doesn't work in np++... ("Now try to search using the regex reg(ular expressions?|ex(p|es)?) This regex will find all names, singular and plural, I have used on this page to say 'regex'.")
Other, more simple, examples I tried with np++ works.
That tutorial is written by the author of EditPad Pro (in which the above search works) - is he making use of some non-standard/windows only implementations? (If there is such a thing... ?)
Ok, I've found something pointing to that there are differences in syntax in different tools... :-\ http://sitescooper.org/tao_regexps.html#Regular_Expressions_In_Various_Tools I hoped I'd be gaining some universal knowledge! :) Which syntax does np++ use?
Notepad++ uses Scintilla component. Scintilla component has its own implementation of regular expressions, which is a (very) small subset of features supported by POSIX regular expressions.
You can find more information about Scintillas regular expression syntax here: http://scintilla.sourceforge.net/ScintillaDoc.html#Searching
Forgot to mention, that in Notepad++ SCFIND_POSIX flag is always set - this flag is also documented on that page.
(keywords: POSIX, regex, expressions)
Why not just implement full POSIX expressions?
Now i have top open up another editor each time i want to work with regular expressions, since most semi-advanced features don't work, or not as expected.
It would be nice. Is there just a particular operation you want to do? Maybe there's another way.
Scintilla's developers don't want to do that.
https://sourceforge.net/tracker/index.php?func=detail&aid=1696579&group_id=2439&atid=352439
Interesting, is it possible to implement a powerfull regex engine like PCRE as a plugin? All that needed for that is to get the text in editor as a long zero-terminated string... But it's not possible in scintilla afaik? Only possiible to copy whole the text to a temporary buffer, but for big files it'll be slow and consume a lot of memory... Or to change PCRE routines so that they use scintilla's Accessor* clases to get characters from the editor...