Skip to content

Instantly share code, notes, and snippets.

@jmcdice
Last active February 9, 2017 04:53
Show Gist options
  • Save jmcdice/25677b8037e29d66dd02e3564414e076 to your computer and use it in GitHub Desktop.
Save jmcdice/25677b8037e29d66dd02e3564414e076 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
$regexp = '\d\d:\d\d:\d\d';
while(<>){
if(/($reg)/g) {
print"$1\n"
}
while( m/($reg)/g ){
print"$1\n"
}
}
cat test.txt
16:33:56,
16:33:56,
16:33:56,10:00:00
$ cat test.txt | ./test.pl
16:33:56
16:33:56
16:33:56
10:00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment