User forums > General (but related to Code::Blocks)

Infinite loop in RegEx search & replace

<< < (2/2)

dmoore:

--- Quote from: Poobah on April 11, 2007, 04:53:45 am ---Does your patch allow usage of subexpressions and all that fancy stuff? I have been wanting to be able to use subexpressions in CB's search and replace.

--- End quote ---

you can see exactly what wxWidget's advanced regex is supposed to support here: http://www.wxwidgets.org/manuals/2.8/wx_wxresyn.html

it looks like Mandrav has accepted the patch so you will be able to test this yourself on the latest nightly soon. You will have to enable advanced regex in the editors settings dialog, then it should work for find, replace, find in files and replace in files. there are definitely some issues - for example you will get wierdness if your EOL character is a CR (\r) instead of a LF (\n)

I will look at the infinite loop bug tomorrow.

dmoore:
bug report (#10886): http://developer.berlios.de/bugs/?func=detailbug&bug_id=10886&group_id=5358

patch (#1960): http://developer.berlios.de/patch/?func=detailpatch&patch_id=1960&group_id=5358

Please test to make sure I have resolved the issue. (I have done some basic testing and have no issues)

Poobah:
How do I use the patch?

dmoore:
have you compiled CB from source? if you have, you need to download a patch tool (there is a GNU patch tool at http://gnuwin32.sourceforge.net/packages/patch.htm), copy the patch file to the source root then apply it with the appropriate command line. (otherwise you could just modify the source files by hand since there are only 3 changed lines and patch files are quite readable)

otherwise just download and run the pre-compiled barebones win32 CB binary that I have put here: http://www.savefile.com/files/641284 (7-zip archive)

Poobah:
It seems to work fine for me. Thanks for fixing it!

Navigation

[0] Message Index

[*] Previous page

Go to full version