how is npp's regex different from https://regex101.com/ regex?
-
@Meta-Chuh said:
the last time i gave him an extensive answer, about how to test notepad++ commits, he politely slowed me down a bit and said, that it was too much information for him.
:-) Sorry for that. I am a newbie at regex, and my growing age is blunting my quick learning. Smaller bites help me. :-)
Thanks for considerations.
-
That brings me to an idea.
I assume that these regex libraries are available ready to be compiled with apps and are for free.
In that case, can boost regex library be removed from npp and can npp be compiled with other such libraries?
Can a user do it if npp code is available?
Or can I ask for this a new feature in regex that npp is compiled will “ALL” libraries of regex, and find/ replace window gets a new option of "what type of regex (“PCRE/ Pyton/ Java/…)?”
That will probably make npp the only editor that has option to use all types of regex at the tick of a check box.
What would be pros and cons of that?
-
Also, as @Eko-palypse shared above, pythonscript provides its own regex tester, which is different from npp’s default boost regex library,
so, can flavors of all type of regex libraries be supplied as a plug-in (or one for one plug-in) to be used with npp?
I can’t do that, maybe a hint for plug-in developers.
-
btw: @MAPJe71 recently posted a free offline regex tester tool.
@MAPJe71 wrote: Additional Regex Tester tool (offline): RegEx Tester
maybe this tool can be of interest for you too.
-
@Meta-Chuh promptly downloaded that. shall test when next requirement comes up.
maybe, npp developers can crack an arrangement with @MAPJe71 to bundle the tester zipfile with npp installer.
-
@V-S-Rawat said:
Also, as @Eko-palypse shared above, pythonscript provides its own regex tester, which is different from npp’s default boost regex library,
True, but the closest you can get at the moment - as far as I know.
One question you haven’t answered, or I have over read, is what you are doing with the regex at the end.
If you use the find replace dialog then non of the solution will 100% fit and the closest might be
the RegexTester from PythonScript plugin.
If you want to use the regex within a PythonScript plugin then RegexTester matches 100% .The idea of having all regex engines in one product is a nice idea but doesn’t guarantee it is always
like it is in npp. Just a note, C++ (14/17 ??) has now its own regex engine as well. -
@Eko-palypse said:
If you want to use the regex within a PythonScript plugin then RegexTester matches 100%
This is because RegexTester is written in Pythonscript itself, and calls the regex engine of Pythonscript, which is NOT the Python regex engine.
I have done some research and it is my understanding from reading some earlier postings here as well as the product description, that Regex Buddy is the best regex tester, but it is not free. It can directly use the Boost regex engine that is a close to what is in Notepad++ as one can get. Regarding not free: It depends how much time you waste having regex problems currently. It does not take much time of that sort before such a program pays for itself. And so we’re clear, I have no affiliation with Regex buddy.
-
off topic, but important: @Alan-Kilborn
could you please have a look at this topic link below ?
this is very strange, as the nodebb db got scrambled somehow.
it was the topic where we were talking about udl manuals, and one of your posts disappeared.further more, the id’s got mixed up and out of alignment, so that instead of your post, we see rddim.
and most weird thing: my answer to your post has your name now, which is completely out of context.
afaik i suppose that it wasn’t done by the mods, as there was no reason what so ever to delete any of the posts, especially not yours.
did you by any chance accidentally or willingly delete it yourself ?
if yes, there could be some sort of bbs db bug.note: please don’t delete this “hybrid post mixup”, because it is not yet known, if someone might need it for any investigations.
i’ve already notified don & co. about that. -
Strange indeed. I deleted nothing, accidentally or willingly. I do now see that a posting that is clearly authored by you is attributed to me. Maybe I look smart now. :)
-
I use regex in npp as a normal text cleaning. removing unwanted text, breaking lines at certain places “, ; . etc.”, joining them back after certain processing.
I don’t use regex in pythonscript, because I don’t know much of pythonscript.
several things I do is repetitive, I have to do the same set, with slight changes for numbers, etc., to break the text again and again, and join back again and again after processing, that’s why I had thought to make pythonscripts for repeated use, and I had installed the plugin.
But I tried for somedays and couldn’t make much headway so I gave up. Now only one pythonscript is there for repeated things.
some day I will gather courage again to learn pythonscript, till then it is find-replace regex on text.