Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: mariocup on October 15, 2007, 05:13:09 pm

Title: Regular expression in codeblocks find dialog
Post by: mariocup on October 15, 2007, 05:13:09 pm
Hi,

in my application I want to remove CRLF CRLF with CRLF. So I searched with a regular expression \n\n, but CB does not give a search result. If I try this with other editors it works.
How to search for newlines in CB?

Thx.
Title: Re: Regular expression in codeblocks find dialog
Post by: zmth on February 02, 2020, 08:44:42 am
wanted to start a new topic but in this forum there is ABSOLUTIELY NO WAY TO START A NEW TOPIC!!
in help NOTHING applies. NOWHERE is there an icon to start a new topic. Anyway i want to ask how do i change from the regular search to regular expression search. I already checked that box in options
"
Note:
If you want to search for regular expressions like n you will have to set the option ’Use Advanced RegEx searches’ via the menu ’Settings’ /’Editor’ /’General Settings’ "

but when i go to put anything in the search place it is just literal !  it searches for exactly what i put so there is no way for it to know i want to search for a regular expression expression instead of just the literal exactly what i write.
Title: Re: Regular expression in codeblocks find dialog
Post by: oBFusCATed on February 02, 2020, 10:45:19 am
wanted to start a new topic but in this forum there is ABSOLUTIELY NO WAY TO START A NEW TOPIC!!

Yes, there is. First go to the forum http://forums.codeblocks.org/index.php/board,3.0.html at the top there is a "New topic" button.

in help NOTHING applies. NOWHERE is there an icon to start a new topic. Anyway i want to ask how do i change from the regular search to regular expression search. I already checked that box in options
"
Note:
If you want to search for regular expressions like n you will have to set the option ’Use Advanced RegEx searches’ via the menu ’Settings’ /’Editor’ /’General Settings’ "

but when i go to put anything in the search place it is just literal !  it searches for exactly what i put so there is no way for it to know i want to search for a regular expression expression instead of just the literal exactly what i write.

Open the find dialog. On the right there is the regular expression checkbox.
If it doesn't work you'll have to describe the problem with steps to reproduce. This option you're changing just changes the mode of regular expressions.
Title: Re: Regular expression in codeblocks find dialog
Post by: zmth on February 02, 2020, 03:32:42 pm
Yea i found that 'post new message' but they sure do a good job of hiding it! The ONLY way i found to get there was directly rt clicking on mouse of exactly what u had written in hypertext i guess u would call it.How on earth would anyone be led to that page otherwise ? ! One can go thru all choices and never get to that page .

Anyway found the check box for regular expression search and was able to get many things to work and use. But how does one replace or paste the special expressions. Eg esp for linefeed/carriage return which are i think \r, \n. But whenever i try to replace with one of these it just puts directly the \r  or \n. I remember many years ago i had a strictly dos editor with no regular expression capability in general but one could paste control characters by using a certain convention and/or paste any of the basic128 ascii symbols according to their exact ascii number so if nothing else could past the hex ascii 0A or 0D which are linefeed,carriage return or reverse order i forget exaclty. So how do u do this in code blocks. Also there is no multi line capability. For example sometimes want to use the ftn95 fortran compiler which is ridiculous in may ways while  gfortran is not. iN PARticular I need to replace the end of line character & which only need at the end officially and is the only place i write them which satisfies gfortran to also at the beginning of the continued line for otherwise ftn95 ,the one by SilverFrost anyway, gives error if it does not appear in both places. Is there anyway to automate that in code blocks search and replace ?
Also does anyone know how to be notified by email when someone answers my posts as could not find that option in my profile or anywhere.
Title: Re: Regular expression in codeblocks find dialog
Post by: stahta01 on February 02, 2020, 10:04:27 pm
Are you blind?

Edit: I am asking because you failed to see the "new topic" button; and, I wondered if it was because the reading software was having issues finding it.

Edit2: You need to click on a sub-forum before you can post in it!

Tim S.