S
Shawna
I'm using Java 1.4.2_05 and need some help getting a logical OR to work
within my pattern matcher.
I'm trying to get both string A and B to be recognized by one pattern?
String strA = "04/14:03,blahblahblah\u007F";
String strB = "04/14:03,blahblahblah";
So I'm trying to match:
Two numerals followed by slash followed by 2 numerals followed by a
colon followed by 2 numerals followed by a comma followed by anything
followed by a one or 0 delete character OR the end of the line/string.
Here is the regex:
Pattern.compile("[0-9]{2}[\u002F][0-9]{2}[\u003A][0-9]{2}[\u002C].+[\u007F?]|[$]",
Pattern.DOTALL);
The logical OR doesn't work though. And I've tried the OR a few other
ways as well.
.... [\u007F|$]
.... [\u007F?|$]
.... [\u007f]?|[$]
These don't work either.
I'd appreciate any suggestions.
Thanks,
Shawna
within my pattern matcher.
I'm trying to get both string A and B to be recognized by one pattern?
String strA = "04/14:03,blahblahblah\u007F";
String strB = "04/14:03,blahblahblah";
So I'm trying to match:
Two numerals followed by slash followed by 2 numerals followed by a
colon followed by 2 numerals followed by a comma followed by anything
followed by a one or 0 delete character OR the end of the line/string.
Here is the regex:
Pattern.compile("[0-9]{2}[\u002F][0-9]{2}[\u003A][0-9]{2}[\u002C].+[\u007F?]|[$]",
Pattern.DOTALL);
The logical OR doesn't work though. And I've tried the OR a few other
ways as well.
.... [\u007F|$]
.... [\u007F?|$]
.... [\u007f]?|[$]
These don't work either.
I'd appreciate any suggestions.
Thanks,
Shawna