且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用perl提取长字符串中的大写单词

更新时间:2023-02-18 20:59:35

使用字符类:

my @matches = ( $string =~ /\b[[:upper:]|[:digit:]]{3,}+\b/g );
say join " - ", @matches;

(您说的是大写字符数字。您没有指定在哪里

(You stated uppercase characters and numbers. You didn't specify where the number would be. You also didn't say whether or not I need to do something with the number.

编辑您的问题以包括其他要求。

Edit your question to include other requirements).