use Regexp::Common;# Dotted decimal IP address/$RE{net}{IPv4}/;# Dotted hexadecimal IP address/$RE{net}{IPv4}{hex}/;# Colon separated octal IP address/$RE{net}{IPv4}{oct}{-sep => ':'}/;# Dotted binary IP address/$RE{net}{IPv4}{bin}/;# MAC address/$RE{net}{MAC}/;# Space separated octal MAC address/$RE{net}{MAC}{oct}{-sep => " "}/;# a number/$RE{num}{real}/;# a ['"`] quoted string/$RE{quoted}/; # a /.../ sequence};/$RE{delimited}{-delim=>'/'}/;# balanced parentheses/$RE{balanced}{-parens=>'()'}/;# a #*@%-ing word/$RE{profanity}/;## name Interface use Regexp::Common 'RE_ALL';# a numberRE_num_real();# a ['"`] quoted stringRE_quoted();# a /.../ sequenceRE_delimited(-delim=>'/');# balanced parenthesesRE_balanced(-parens=>'()');# a #*@%-ing wordRE_profanity();总结
以上是内存溢出为你收集整理的Perl 5 的正则表达式全部内容,希望文章能够帮你解决Perl 5 的正则表达式所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)