in reply to get string between two < tags > in .js file (xml)

This is what I've written but I'm not sure how to make that one liner work inside a script

As Tutorials: Basic debugging checklist teaches, use B::Deparse to see how perl interprets the code (the oneliner)

  • Comment on Re: get string between two < tags > in .js file (xml)

Replies are listed 'Best First'.
Re^2: get string between two < tags > in .js file (xml)
by kamchez (Initiate) on Jul 03, 2012 at 10:23 UTC
    thank you for replying ... That one liner is not going to help me here because it removes all characters before .*</Name><Symbol> and all characters after </Symbol>.* leaving me with only 1 (the first match) of the string
    perl -0777 -pe 's#.*</Name><Symbol>##s;s#</Symbol>.*##s'
    Any ideas on how to solve this the proper way?

      Any ideas on how to solve this the proper way?

      Sure, but it appears you don't want to do it that way :)( you want regex )