Created
December 27, 2011 15:24
-
-
Save tadzik/1523992 to your computer and use it in GitHub Desktop.
Regex from string
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
my $hello = "'/'hello'/'(<-[\\/\\.]>+)"; | |
my $reg = / ^ <$hello> $ /; | |
"/hello/bug" ~~ $reg; | |
say $/[0]; | |
"/hello/bug" ~~ / ^ '/'hello'/'(<-[\\/\\.]>+) $ /; | |
say $/[0].perl; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment