use of regex
    spir 
    denis.spir at gmail.com
       
    Sun Jan  9 10:31:17 PST 2011
    
    
  
Hello,
After getting a MatchResult by calling match(source, engine): Seems that, if match has failed, calling result.hit() throws an assertion error. Then, how can I know whether match was successful? As there is always a matchResult object returned. I'm looking for a kind of success.failure flag on the matchResult.
Note: this is for single match at start of source.
I found this strange thingie in the online docs:
struct RegexMatch(Range = string);
	...
	bool chr(ref uint si, E c);
    	    Returns whether string s matches this.
???
Whether string s (which?) matches this (RegexMatch object): ???
And what are 'si' & 'c'?
Denis
-- -- -- -- -- -- --
vit esse estrany ☣
spir.wikidot.com
    
    
More information about the Digitalmars-d-learn
mailing list