in reply to Re^4: script to grab string from log and print them in a different log
in thread script to grab string from log and print them in a different log

my $MAL = '^"_.*"$';

Is that what you want? ^ matchs the start of a line and $ matches the end. So this matches lines that only contain your string. As I read your spec, your string was only part of the line - in which case my solution might work better.

Update: Hmm... not sure why I'm being downvoted here as it looks to me like I'm pointing out the problem that liverpole spotted and fixed half an hour later. If someone could be polite enough to explain what they see as the problem then I'd appreciate it.

  • Comment on Re^5: script to grab string from log and print them in a different log
  • Download Code