by accident or not ;-)  you get same results...you could simplify old pattern by removing last \. (dot):
public static final Pattern PRE_PROCESS_PATTERN =  Pattern.compile("(?<!GMT)[\\s,-/]+");
range between , (comma) and /

010 1100 054 44 2C ,
010 1101 055 45 2D -
010 1110 056 46 2E .
010 1111 057 47 2F /







-m





Alan Burlison wrote:
In DateTypeConverter.java I see this:

public static final Pattern PRE_PROCESS_PATTERN = 
Pattern.compile("(?<!GMT)[\\s,-/\\.]+");

That RE is almost certainly incorrect.  The '-' in the character class 
is acting as a character range metacharacter, not a bare hyphen.  As it 
happens, in ASCII the range between ',' and '/' is ',' '-' '.' '/', all 
of which appear elsewhere in the character class, so it works by 
accident - at least for ASCII.

The correct RE is "(?<!GMT)[\\s,/\\.-]+"  Putting the '-' as the last 
character means it is treated as a hyphen, not a character range 
metacharacter.

  


-- 
marijan milicevic / software engineering
|    ||   |||  ||  info.nl, amsterdam
Sint Antoniesbreestraat 16
1011 HB Amsterdam
+31 (0) 20 530 9100 /T
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to