Hi
 
Sorry about this out of topic message...
 
I have a problem with some regular expressions processing...
 
            String input = "(1+f(8,8)) pe,concat(concat(CO_LONGITUDE,';'),CO_LATITUDE) 
UNIQUEID,CO_LONGITUDE,CO_LATITUDE,count(CO_LONGITUDE) QTE, ant";
            String regex = "[a-zA-Z]*([(].*[)] [a-zA-Z]+)";
            Pattern pattern = Pattern.compile(regex);
            Matcher matcher = pattern.matcher(input);
            while(matcher.find())
                Logger.log(matcher.group());
 
my first match is : (1+f(8,8)) pe,concat(concat(CO_LONGITUDE,';'),CO_LATITUDE) 
UNIQUEID,CO_LONGITUDE,CO_LATITUDE,count(CO_LONGITUDE) QTE

I want the first shortest match, i.e. : (1+f(8,8)) pe
 
I readed a little on some newsgroups. I know its possible in Perl..
 
But, with the java package, I dunno if its possible. By the way, I m new to regulars 
expressions...
 
Antoine
 

Salutations,

__________________________________________________<?XML:NAMESPACE PREFIX = O /> 

Antoine Gilbert /  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
Analyste-programmeur

KOREM
Technologies de GÉOdiffusion 

__________________________________________________

680, boul. Charest Est, bureau 120
Québec (Québec) G1K 3J4
 
<http://www.mapanswer.com/07_localisation/LocalisationDemoNav.jsp?street=charest+est&city=quebec&civicNumber=680&code=&profile=qdm>
 Localisation KOREM Qc
Tél. : (418) 647-1555
Téléc. : (418) 647-1666
1 888 440-1MAP 

 <http://www.korem.com/> www.korem.com
__________________________________________________

* Partenaire canadien MapInfo de l'année - 2001
* Meilleur nouveau partenaire MapInfo 2000-Amérique du Nord

__________________________________________________ 

  

 

Reply via email to