Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

different behavior with regex on linux vs windows

 
Ben David
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting different behavior with regex matching using java.util.regex.Matcher depending on if it is run on windows or linux. Anybody know why this might be?

 
Rob Spoor
Sheriff
Pie
Posts: 20527
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using any line breaks in your regex? Or is your regex depending on line breaks in the input?
 
Ben David
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nevermind! On windows I was running within eclipse. In linux I was running bins from a jar. I had renamed an old version of the jar, and didnt realize it would still look in this jar in the lib folder even though it had a different name. And this other jar file also had an xml conf file (by accident). On linux, it was apparently finding the conf file in this renamed jar and so it never looked in the "conf" folder for the most recent xml file.

Newb mistake.


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic