Keep It Simple, Stupid | |
PerlMonks |
How do I extract named variable names from regex stringby maspsr (Initiate) |
on Jan 30, 2012 at 13:39 UTC ( [id://950770]=perlquestion: print w/replies, xml ) | Need Help?? |
maspsr has asked for the wisdom of the Perl Monks concerning the following question: Hi I Have the following regex which I use when extracting information from different logfiles:
I would like to extract all the named parameters like ?<mon>,?<day>,.... to make sure that I haven't used same name twice. The string is composed from substring I have in a database. I have tried different approaches but until now without success. I thought I could use some repetitive pattern like (\?<(a-z+)>+ But I can't make it work. I could use the perl split function and probably get a list og the names. any ideas ? best regards Peter Sørensen/Univ.Of.Southern.Denmark
Back to
Seekers of Perl Wisdom
|
|