Created
March 6, 2012 03:02
-
-
Save ejhayes/1983135 to your computer and use it in GitHub Desktop.
Using perl to extract elements from regex into an array
This file contains hidden or 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
use Data::Dumper; | |
$s = "1-19A"; | |
@a = $s =~ m/(\d+)\-(\d+)([A-Z])?/i; | |
print Dumper(@a) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment