Closed damithc closed 10 years ago
From OTS.Nexus on February 06, 2014 04:56:20
Actually String class itself already got an instance method which checks whether the string matches a given regex. matches(regex) : boolean
Just that for the case where it involves characters with diacritics (like é, à), we have to use the CANON_EQ flag to enable canonical equivalence checking as below: Pattern.compile(regex, Pattern.CANON_EQ).matcher(value).matches();
So we are going to create a higher level method to execute the above combined statements?
From dam...@gmail.com on February 06, 2014 05:21:00
Can create a higher level method. What happens if you use the flag for all cases? Will that work?
From OTS.Nexus on February 06, 2014 21:10:30
Supposed to be ok. Although the API mentions that using the flag may impose a performance penalty, it might not affect us a lot i think since we are not validating any extremely long string. http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html#CANON_EQ
From dam...@gmail.com on February 06, 2014 21:23:32
OK, we can try that. Just add a comment to say that the method may be slower than necessary.
From OTS.Nexus on February 12, 2014 03:08:11
ReadyForReview: https://codereview.appspot.com/61510050/ Comments explaining the regex were changed to Javadoc comment for easier reference
Status: ReadyForReview
From dam...@gmail.com on February 12, 2014 18:55:05
Status: ReadyToMerge
From OTS.Nexus on February 13, 2014 05:48:38
This issue was updated by revision d582e2c32b94 .
From dam...@gmail.com on February 14, 2014 07:46:26
Did you get dev green for this? This may be the cause for recent test failures.
From OTS.Nexus on February 14, 2014 07:59:17
The bug mentioned by Arnold? When i ran the test in dev server before merging with the default branch it seems ok. I am checking for it now.
From OTS.Nexus on February 14, 2014 08:24:12
It is the change of the regex testing method inside one of the method of AssertHelper class which causes the bug. It is a small change i made after running the all test suite. My fault for not re-running the whole test again.
Status: Started
From OTS.Nexus on February 14, 2014 08:26:07
This issue was updated by revision 76cd8f35d97f .
From dam...@gmail.com on February 14, 2014 19:02:37
Status: Deployed
Labels: Milestone-V4.87
From dam...@gmail.com on February 06, 2014 07:41:32
something like this: isMatching(regex, string): boolean
This can be used for testing regex correctness.
Can be in string helper?
Original issue: http://code.google.com/p/teammatespes/issues/detail?id=1590