|
|
Comments and Discussions
|
|
 |

|
Hello, I ran the notepadre.reg to register the app and regular notepad disappear. Is not that i need notepad, but i found a beter regex application and want to remove notepadre. Thank you.
|
|
|
|

|
Go into Explorer, right click a text file and select Open With->Choose Program... In there select the editor you want as default and tick the "Always use the selected program to open this kind of file" check box.
This is in Windows XP, but I think it is similar for Windows 7.
Regards,
Ben
|
|
|
|

|
regex : \b.+?\b desc : split words and no words text : abc-abc-abc expected: "abc" + "-" + "abc" + "-" + "abc" result : "abc" + "abc" + "abc" regex : \p{Ll}+ desc : find all lower char literals text : abc-abc-abc expected: "abc" + "abc" + "abc" result : Invalid character class name how to avoid them?
|
|
|
|

|
\b.+?\b matches strings starting and ending on a word boundary. That is why you are not seeing '-' matched. Maybe you wanted \b.+?\b|-.
- Instead of \p{LI}+ use \p{lower}+.
Regards,
Ben
|
|
|
|

|
example: abc-abc-abc word boundaries (\b position at |) are: "|a" "c|-" "-|a" "c|-" "-|a" "c|" or isnt? thats why expected results not correct! code: \p{lower} hello "lower" isnt a valid unicode property! "Ll" is the right one for "Lower letters". take a look at: http://unicode.org/Public/UNIDATA/PropertyValueAliases.txt using boost library seems to be the wrong way.
|
|
|
|
|

|
I have a CRLF terminated large txt file and would like to do a search for
lines containing Joe and John OR Mary and Betty (case insensitive)
At the moment I do this in four passes!!!:
1. search for "Joe"
2. if found then search for "John"
3. if found then select record
4. if fail, then search for "Mary"
5. If found then search for "Betty"
6. if found then select record
This is very bad code! How do i code an optimized regex expression to do above?
|
|
|
|

|
Assuming Perl compatible regex mode:
(Joe.*?John|John.*?Joe)|(Mary.*?Betty|Betty.*?Mary)
You could add \< before each name and \> after each name if you don't want to allow JoeJohn to match etc.
Regards,
Ben
|
|
|
|

|
Hello. I didn't want to open new thread, so I just use newest one. Just want to express my gratitude and it's shame this little gem is so hard to find. Sorry for bad english. Bye.
|
|
|
|

|
Thanks!
Glad you found it useful.
Regards,
Ben
|
|
|
|

|
So, in looking to take search and replace to the next level I have started to consider recursive regexes/full grammar specification. Boost.Xpressive supports recursive regexes but only at build time, but it turns out that PCRE supports them at runtime. Unfortunately, it appears that PCRE does not have a wchar_t interface which makes it unsuitable for Notepad RE. As source files are generally just ASCII anyway, I'm thinking I'll write a Visual Studio plugin using PCRE instead (the DEVs at work would prefer this approach in any case).
If this interests you, please add a comment to this message.
Also, if you would like to see boost support recursive regexes, drop them a line on the mailing list (I use nabble for postings if that helps - http://www.nabble.com/Boost---Dev-f14201.html).
Regards,
Ben
|
|
|
|

|
PCRE supports Unicode by accepting the UTF-8 encoding. You can convert your input to UTF-8 (char*) and execute the RE on the converted text. If you want to implement replacing too, it would be an editor-specific code anyway. (I was able to integrate PCRE in the UTF-8 mode to Scintilla.) --- Ferda
|
|
|
|

|
I would like to test the Unicode support in Notepad RE, as I wasn't aware of UTF-16 when I wrote this originally! Does anyone have any good test files I could use to experiment? As well as reading trickier files correctly, I would also like to use Unicode aware searching in non-regex mode and switch to the ICU support for boost::regex.
Any help/pointers much appreciated.
Thanks,
Ben
|
|
|
|

|
I have tried to compile using the latest boost release and I get a lot of errors.
Which version of boost should I use?
|
|
|
|

|
I tried version 1.38 and it worked fine.
Did you follow the build instructions from this article?
|
|
|
|

|
How many of you still use VC6? (We have switched to VS 2005 at work now and will move to VC 2008 ASAP).
Cheers,
Ben
|
|
|
|

|
i do but will sonn switch to vc2008
|
|
|
|

|
Hi Everyone,
How many of you use tr1? Should I switch to the tr1::regex library yet?
Thanks,
Ben
|
|
|
|

|
I will answer my own question..!
Due to bugs in the VC 2008 implementation of tr1 and the fact that tr1::regex appears to be slower in some cases than the latest boost::regex, I will hold off switching for now.
|
|
|
|

|
Hi
great artical...
I have downloaded Version 1.36.0.
but one problem when i am building Application
fatal error LNK1104: cannot open file "libboost_regex-vc6-mt-sgd-1_36.lib"
but this path "C:\boost_1_36_0\libs\regex\build\vc6" has only "libboost_regex-vc6-mt-sgd-1_35.lib"
plz Help..
|
|
|
|

|
Hi there,
Thanks!
I would say just rename the .lib. If that doesn't work you could always download version 1.35 of boost, but I suspect a rename of the lib will be fine.
Let me know how you get on.
Cheers,
Ben
|
|
|
|

|
First off thanks a lot this program was a blessing. I searched hours for a simple windows program that would have a regExp search/replace feature and that didn't need to be installed. At first I thought Notepad++ was the answer to my prayers but it's regExp support is a joke (only quantifiers are the greedy * and +, and multi line matches are virtually impossible to achieve without dirty workarounds).
So once again THANK YOU A LOT.
I think I might have found a spelling-mistake in the chm help file ./Unicode_release/NotepadRE.chm in "Replace Syntax" it says:
\x{DDDD} Outputs the character whose hexadecimal code point is 0xDDDDD
I'm not sure but I think there's one D too much at the end
ps:thanks
|
|
|
|

|
Thanks for your feedback and I'm glad you found it useful! I have also found that most Windows editors have cruddy regex support (even Visual Studio). I also think the .NET so-called (i.e. non standard) regular expressions are worse than useless.
I will update the .chm.
Cheers,
Ben
|
|
|
|

|
I have released a new version of the RegEx Tester tool. You can download it free from http://www.codeproject.com/KB/string/regextester.aspx and http://sourceforge.net/projects/regextester
With RegEx Tester you can fully develop and test your regular expression against a target text. It's UI is designed to aid you in the RegEx developing. It uses and supports ALL of the features available in the .NET RegEx Class.
|
|
|
|

|
Hi!
Thanks for this! This notepad, is what I've been looking for, for about 10 years...
When I was a child I knew an old guy who was working on an advanced editor which does the same (much more than this one, but basically the same), it was for DOS, and it was like the project of his life... It was capable of finding and replacing so complex expressions that I didnt know who the heck will ever need it. But it was his personal project, and as far as I know, he never shared it, or even published as software/shareware...
Your Notepad RE is going to save me soooo much headache!
Thanks again...
Daniel
-----
Daniel Cohen Gindi
danielgindi (at) gmail dot com
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
Search and replace text in Notepad RE using Regular Expressions or normal mode. The editor supports drag and drop, file change notifications, and displays the line and column numbers. Unicode support is available too.
| Type | Article |
| Licence | CPOL |
| First Posted | 22 Jul 2003 |
| Views | 380,017 |
| Downloads | 6,852 |
| Bookmarked | 225 times |
|
|