Page 1 of 1

Need help

Posted: Thu Feb 21, 2008 9:35 am
by nitinmukesh123
Hi I have code comments in a file as shown in below format.

/* ---------
sdl;f jkdf;kl gkdsf g
df df gfdg dfg fd
g fdgdfg * cfv df gd

*/

I need help in creating regex to remove everything in between /* */ including /* */

I tried

/\*.*$\n

But after this I am unable to rpoceed. Any help is appreciated.

Posted: Thu Feb 21, 2008 12:09 pm
by ben_josephs
Unfortunately, TextPad's aged regular expression engine is incapable of matching text containing an arbitrary number of newlines.

But you can do it with WildEdit (http://www.textpad.com/products/wildedit/), which uses a far more powerful regular expression engine:
Find what: /\*.*\*/
Replace with: [nothing]

[X] Regular expression

Options
[ ] '.' does not match a newline character [i.e., not selected]