Well, in some cases, like when posting some stack trace and kinda, there is data in form or regex, like brackets.. so this causes the replaceAll() to fail.. I made a little hack now:
You can see the whole code in the method preparePostText(), from PostVH.java
hope it works.
I also added the utf-8 encoding. am sending to cvs right now.
Rafael [originally posted on jforum.net by Rafael Steil]
Try not to use replaceAll. Use find() with loop appending stuff to a StringBuffer instead. It's kinda more difficult but gives you more control. [originally posted on jforum.net by Daniil]
Take a look at this, a part of my simple home-brewn minimalistic template processor for the example on how can you deal with regexps (replaces dollarvar and dollar{var} in input text with some values taken from a java.util.Map instance). (just afraid of using 'dollar' sign here, it may confuse replaceAll again)