Last active
February 9, 2017 04:53
-
-
Save jmcdice/25677b8037e29d66dd02e3564414e076 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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