commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benedikt Ritter <brit...@apache.org>
Subject Re: svn commit: r1589446 - in /commons/proper/lang/trunk/src: main/java/org/apache/commons/lang3/time/FastDateParser.java test/java/org/apache/commons/lang3/time/FastDateParserTest.java
Date Fri, 25 Apr 2014 09:02:58 GMT
In any case, please remember to add your changes to changes xml.


2014-04-24 17:58 GMT+02:00 Honton, Charles <Charles_Honton@intuit.com>:

> TextStrategy is only for parsing finite set of string choices. Literal
> text is handled by CopyQuotedStrategy.
>
>
> On 4/23/14, 6:14 PM, "sebb" <sebbaz@gmail.com> wrote:
>
> >On 23 April 2014 21:19, Honton, Charles <Charles_Honton@intuit.com>
> wrote:
> >> TextStrategy is used for:
> >> E - DAY_OF_WEEK
> >> G - ERA
> >> M - MONTH
> >> a - AM_PM
> >
> >Is that the only possible use of TextStrategy?
> >What about literal text?
> >
> >> SimpleDateFormat uses case-insensitive parsing for each of these fields.
> >> I will add tests for each of those fields in multiple Locales.
> >
> >Thanks.
> >
> >> The (?u)(?i) modifier is active just for the duration of the group.
> >
> >I did not know that.
> >Eventually found it documented but hidden away in the section on
> >differences from Perl.
> >
> >Note: could be written as (?iu)
> >
> >> Consider the following unit test:
> >>
> >> @Test
> >>     public void testCaseSensitiveModifier() throws Exception {
> >>    Pattern aabb = Pattern.compile("((?u)(?i)AA)BB");
> >>    assertTrue(aabb.matcher("aaBB").matches());
> >>    assertTrue(aabb.matcher("AABB").matches());
> >>    assertFalse(aabb.matcher("aabb").matches());
> >>    assertFalse(aabb.matcher("AAbb").matches());
> >> }
> >>
> >> Regards,
> >> chas
> . . .
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
http://people.apache.org/~britter/
http://www.systemoutprintln.de/
http://twitter.com/BenediktRitter
http://github.com/britter

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message