Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2AB501122A for ; Fri, 25 Apr 2014 09:03:08 +0000 (UTC) Received: (qmail 62064 invoked by uid 500); 25 Apr 2014 09:03:02 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 61563 invoked by uid 500); 25 Apr 2014 09:03:01 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 61555 invoked by uid 99); 25 Apr 2014 09:03:00 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Apr 2014 09:03:00 +0000 Received: from localhost (HELO mail-we0-f169.google.com) (127.0.0.1) (smtp-auth username britter, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Apr 2014 09:03:00 +0000 Received: by mail-we0-f169.google.com with SMTP id u56so2150679wes.0 for ; Fri, 25 Apr 2014 02:02:58 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.194.1.242 with SMTP id 18mr5845449wjp.22.1398416578738; Fri, 25 Apr 2014 02:02:58 -0700 (PDT) Received: by 10.194.189.236 with HTTP; Fri, 25 Apr 2014 02:02:58 -0700 (PDT) In-Reply-To: References: <20140423160252.77B452388860@eris.apache.org> Date: Fri, 25 Apr 2014 11:02:58 +0200 Message-ID: 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 From: Benedikt Ritter To: Commons Developers List Content-Type: multipart/alternative; boundary=047d7b3a82146c827704f7da3b98 --047d7b3a82146c827704f7da3b98 Content-Type: text/plain; charset=UTF-8 In any case, please remember to add your changes to changes xml. 2014-04-24 17:58 GMT+02:00 Honton, Charles : > TextStrategy is only for parsing finite set of string choices. Literal > text is handled by CopyQuotedStrategy. > > > On 4/23/14, 6:14 PM, "sebb" wrote: > > >On 23 April 2014 21:19, Honton, Charles > 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 --047d7b3a82146c827704f7da3b98--