Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: regex parsing brainteaser

by Roy Johnson (Monsignor)
on Apr 01, 2008 at 20:35 UTC ( #677829=note: print w/replies, xml ) Need Help??

in reply to regex parsing brainteaser

my %errors = ( $data =~ m#(?:<\%def \.errors>|\G).*?(?:(^\w+):(.*?)$)(?=.*?</\%de +f>)#sgm );
It's not immune to matching before or after the tags, though. That gets uglier:
my %errors = ( $data =~ m#(?:<\%def \.errors>|(?<=.)\G)(?:(?!</\%def>).)*?(?:(^\w ++):([^\n]*))(?=.*?</\%def>)#sgm );

Caution: Contents may have been coded under pressure.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://677829]
[LanX]: Thx found a solution! :)
[Eily]: I wrote "your" instead of "you're" :'(
[Eily]: I guess it means that my English is good enough that I make the same mistakes as native speakers though :/
[LanX]: your native tounge is French .... or Quebequois?
[erix]: never mind the natives
[Eily]: French, why?
LanX ' solution
[LanX]: lately you were talking about kids confused with "la liason"
[LanX]: I stopped worrying about my pronounciation and orthography "problems" in English
[Eily]: ah yes, you asked about the value of neuros :)

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2017-03-27 16:04 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (320 votes). Check out past polls.