Re: PCRE regexp compiler.
Tao Feng <kkkkg999-/[email protected]>
| Newsgroups | gmane.comp.lang.eiffel.gobo.general |
|---|---|
| Message-ID | <[email protected]> |
Thanks Eric. That is the prime I need. Ted --- Eric Bezault <ericb-D6Qt/9opevxWk0Htik3J/[email protected]> wrote: > Tao Feng wrote: > > "indexing" does match either of those patterns, > but > > after that match, has_matched never be false, no > > matter how many times I call "next_match". > > > > Which means that I get this in a loop of querying > > captures of match: > > "indexing" > > "" > > "" > > "" > > "" > > "" > > "" > > . > > . > > . > > . > > (infinite) > > It's because the empty string is a valid match. > You should either use "[a-z]+" instead of "[a-z]*" > as regexp, or call: > > my_regexp.set_empty_allowed (False) > > before calling the match features. See comments > in RX_PCRE_COMPILER.is_empty_allowed for details. > > -- > Eric Bezault > mailto:ericb-D6Qt/9opevxWk0Htik3J/[email protected] > http://www.gobosoft.com > > __________________________________ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs ------------------------ Yahoo! Groups Sponsor --------------------~--> Most low income households are not online. Help bridge the digital divide today! http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/saFolB/TM --------------------------------------------------------------------~-> To Post a message, send it to: [email protected] To Unsubscribe, send a blank message to: [email protected] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/gobo-eiffel/ <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/