• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

And the excetpion once [...] previous topic :) [invalid]

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, a seems to be hot day for you today on bug-catching, Rafael

(Actually, in Latvia, where I from, it's night already... I should go to sleep )
[originally posted on jforum.net by Daniil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hehehe.. here now is 19:00

am sick of these regex problems.. :evil:

am working to fix them, sorry for the problems.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe I can help before I fall asleep? What regexps?
[originally posted on jforum.net by Daniil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Before I go, one more thing regarding regexps.

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)

http://dan.solutions.lv/download/TemplateProcessor.java
[originally posted on jforum.net by Daniil]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic