Skip to content

Instantly share code, notes, and snippets.

@geekdadley
Created January 21, 2014 13:03
Show Gist options
  • Select an option

  • Save geekdadley/8539618 to your computer and use it in GitHub Desktop.

Select an option

Save geekdadley/8539618 to your computer and use it in GitHub Desktop.
摘取文本log中形如表格的两组对应数字
use strict;
while(<>)
{
if($_ =~ m/\|.*?(\d*) \|.*\|.*?(\d*) \|/)
{
if($1 or $2)
{
print("$1 $2\n");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment