Reputation: 283
<msg info=access_denied>
Access_denied can be anything "permit" "Thrashing"
I tried using regex
m/<msg info=([^]*)>/i
It is giving unmatched regex.
What should be actual and correct regex ?
Upvotes: 0
Views: 51
Reputation: 35208
Your negated character class is missing the >
character, for anything not >
:
m/<msg info=([^>]*)>/i
However, just note that if your data is XML, you should consider using an actual XML Parser to pull that data.
Upvotes: 4
Reputation: 29645
I think you are looking for
/<msg info=([^>]+)/
Assuming the input is as you described (no quotes, etc).
Upvotes: 5