我找到了这个正则表达式,想要了解它.是否有任何正则表达式反编译器将以下正则表达式转换为单词?这真的很复杂.
$text =~ /(((\w)\W*(?{$^R.(0+( q{a}lt$3))})) {8}(?{print +pack"B8",$^Rand ""})) +/x;
解决方法
Using
YAPE::Regex::Explain
(不确定它是否好,但它是搜索的第一个结果):
use YAPE::Regex::Explain; my $REx = qr/(((\w)\W*(?{$^R.(0+( q{a}lt$3))})) {8}(?{print +pack"B8",$^Rand ""})) +/x; my $exp = YAPE::Regex::Explain->new($REx)->explain; print $exp;
我的解释如下:
( group and capture to \1 (1 or more times (matching the most amount possible)): ---------------------------------------------------------------------- ( group and capture to \2 (8 times): ---------------------------------------------------------------------- ( group and capture to \3: ---------------------------------------------------------------------- \w word characters (a-z,A-Z,0-9,_) ---------------------------------------------------------------------- ) end of \3 ---------------------------------------------------------------------- \W* non-word characters (all but a-z,_) (0 or more times (matching the most amount possible)) ---------------------------------------------------------------------- (?{$^R.(0+( run this block of Perl code q{a}lt$3))}) ---------------------------------------------------------------------- ){8} end of \2 (NOTE: because you are using a quantifier on this capture,only the LAST repetition of the captured pattern will be stored in \2) ---------------------------------------------------------------------- (?{print +pack"B8" run this block of Perl code,$^Rand ""}) ---------------------------------------------------------------------- )+ end of \1 (NOTE: because you are using a quantifier on this capture,only the LAST repetition of the captured pattern will be stored in \1)
有2个Perl代码块,必须单独分析.
在第一个块中:
$^R . (0 + (q{a} lt $3))
这里,$^R
is“评估最后一次成功(?{code})正则表达式断言的结果”,表达式(0(q {a} lt $3))如果第三次捕获在[bz]中则给出1,0除此以外.
在第二块:
print +pack "B8",$^R and ""
它将之前的评估结果解释为(big-endian) binary string,get the number,convert it to the corresponding character,最后将其打印出来.
正则表达式一起找到每8个字母数字字符,然后将[b-z]中的那些字符视为二进制数字1,否则为0.然后将这8个二进制数字解释为字符代码,并打印出该字符.
例如,匹配字符串时将打印字母“H”= 0b01001000
$test = 'OvERfLOW';
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。