Last active
December 27, 2015 01:29
-
-
Save sng2c/7245491 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/env perl | |
use re 'regexp_pattern'; | |
my $reg = qr/(?i)abc/s; | |
my ($pat,$flag) = regexp_pattern $reg; | |
print "pat :$pat\n" | |
print "flag:$flag\n"; | |
# pat :(?i)abc | |
# flag:is | |
# flag를 반드시 확장표현식으로 넣자. 그래야 저장해 놓고 꺼내 쓰기가 좋다. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment