Dirk Bergmann

Developer, panographer. Does consultancy work from own company. Lives in Chiang Mai, Thailand.


Chiang Mai

Hua Hin

Thailand Hotels

ListVote - List. Vote. Learn.

Partnerseek - Find Partners

Netbeans Regular Expressions Find and Replace

Powerful find and replace with regular expressions should be the hallmark of every IDE worth its mettle. MS Visual Studio does it so-so, but lo and behold, Netbeans (at least in version 6.1) is even worse.

So I wanted to put foo at the beginning of every line in a text, which calls for a regex like:


and replace like:

foo $0

However, Netbeans only ever replaces the first match in a text, over and over again. It also hangs up easily in the process.

As with many a Netbeans quirk, it’s Quanta Plus to the rescue again:


Works like a charm.