From: benjohn@... Date: 2006-03-10T20:42:05+09:00 Subject: Re: Small regexp question >> I need to change: >> >> class MyClass >> { >> ... >> } >> >> to: >> >> class IMP_EXP MyClass >> { >> ... >> } Don't you want to be looking _for_ class xxxx { Where you can have at least one white space between class and xxxx, and any ammount of white space between xxxx and { (I think none is allowable too)? Any white space includes new lines too, as the following are all valid class declarations: class AClass { class AClass { class AClass { and I think even... class AClass{ ? :) Or do you want to get the job done, rather than getting a perfect solution? :) I was playing with regexp yesterday, and wanted to have a pattern match over multiple lines, but couldn't see how that is done (A friend wanted a simple way of stripping out c comments, and they can over multiple lines, of course). Could someone give me a hint on that? Cheers, Benjohn