• Welcome to the world's largest Chinese hacker forum

    Welcome to the world's largest Chinese hacker forum, our forum registration is open! You can now register for technical communication with us, this is a free and open to the world of the BBS, we founded the purpose for the study of network security, please don't release business of black/grey, or on the BBS posts, to seek help hacker if violations, we will permanently frozen your IP and account, thank you for your cooperation. Hacker attack and defense cracking or network Security

    business please click here: Creation Security  From CNHACKTEAM

Recommended Posts

正则与字符串操作

1.基本语法

exec()函数用于检索字符串中正则表达式的匹配项。

如果字符串中有匹配值,则返回匹配值;否则,返回null。

hduntbalwcs4230.png

levz4hgzhei4231.png

分组

正则表达式中由()包装的内容代表一个分组,通过分组可以提取出自己想要的内容。示例代码如下

2jq2nkp11de4232.png

字符串的替换功能

replace()函数用于将字符串中的一些字符替换为其他字符。语法格式如下:

dbst4ckveyh4233.png

示例代码如下:

suvfezhy1354234.png

Link to comment
Share on other sites