in reply to Re: Extract a small part of a long sentence using regular expressions
in thread Extract a small part of a long sentence using regular expressions

Thank you! I tried your method but somehow 2 things go wrong.

1. I am unable to sort the keys in the right order.

2. I keep getting 2 hash dumpers, both containing the same key-value pairs only in different orders!

  • Comment on Re^2: Extract a small part of a long sentence using regular expressions

Replies are listed 'Best First'.
Re^3: Extract a small part of a long sentence using regular expressions
by choroba (Cardinal) on Dec 02, 2014 at 16:15 UTC
    1. Hash keys are not sorted. Check $Data::Dumper::Sortkeys in Data::Dumper.
    2. Your data probably contain two matching lines.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
      Sorry, my bad. Point 1: duly noted and Point 2: I take it back. I overlooked the fact that i have multiple match cases. Too much of Perl for today i suppose!