Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是字符串:
[quote="test post1"]this is a test post[/quote]
我只想检索测试 post1 值
这就是我正在做的...
[tmp test][item-param body] [/tmp] $str1 = $Scratch->{test}; $str1 =~ m/"(.?)"/;
但它没有给出预期值:test post1
任何帮助将不胜感激。
#!/usr/bin/perl; my $str = '[quote="test post1"]this is a test post[/quote]'; if($str=~m/\"(.+)\"/) { print $1; }