6 Replies Latest reply: Jun 5, 2008 10:53 AM by 800282 RSS

    String and regex

    807591
      hi,

      I have a string "Tracking Number|Carrier" in which im looking for regex "|".

      On windows platform with java 1.5.0_11 im able to successfully match using regex-string as "\\|".

      But the same regexstirng on same datastring is not working on Linux with java 1.5.0_08

      Let me know if this really due to java version and platform mismatch or internally there is some other issue.

      Thanks
        • 1. Re: String and regex
          807591
          Please post formatted code and explain how you are feeding this regex in and how you are feeding the string in. If you are doing some stuff from the shell that could well be the issue here. You might want to check that the String you are looking at in Java is in fact the same.
          • 2. Re: String and regex
            800282
            c98553 wrote:
            ...
            Let me know if this really due to java version and platform mismatch or internally there is some other issue.
            ...
            It is most probably your code, and not the Java version.
            • 3. Re: String and regex
              807591
              prometheuzz wrote:
              It is most probably your code, and not the Java version.
              You mean the code he hasn't posted and we can only guess about?
              • 4. Re: String and regex
                807591
                DrLaszloJamf wrote:
                prometheuzz wrote:
                It is most probably your code, and not the Java version.
                You mean the code he hasn't posted and we can only guess about?
                Do you think it's the extraneous semi-colon on line 16?
                • 5. Re: String and regex
                  800282
                  DrLaszloJamf wrote:
                  prometheuzz wrote:
                  It is most probably your code, and not the Java version.
                  You mean the code he hasn't posted and we can only guess about?
                  I double checked my crystal ball: no guessing whatsoever!
                  • 6. Re: String and regex
                    800282
                    cotton.m wrote:
                    DrLaszloJamf wrote:
                    prometheuzz wrote:
                    It is most probably your code, and not the Java version.
                    You mean the code he hasn't posted and we can only guess about?
                    Do you think it's the extraneous semi-colon on line 16?
                    I see you have bought the same ball as I have! I can't answer any questions without it here.