[Gambas-user] pcre: accessing named matches

loco pobre colifata at freenet.de
Wed Aug 18 21:54:00 CEST 2021


Hallo,

a pattern using "named capturing groups" like "title" and "artist" in 
"<td>(?P<title>[^<]*)</td><td>(?P<artist>[^<]*)</td>" works, the matches 
are correctly given by index (rMatch[1].Text ...), but I don't know how 
to access the matches by name - is there an implemented way?

(If not, I think I should make an regexp on the searchpattern to extract 
the names and then merge names and values of the matches in an 
collection ...)

Merci :)


More information about the User mailing list