Skip to content

JavaScript正则 JavaScript regexp 移植MuJS中的正则,使用JavaScript,来实现JavaScript中的正则,RegExp in JavaScript,方便大家使用自己熟悉的语言调试

Notifications You must be signed in to change notification settings

liulinboyi/RegExp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JavaScript版正则(RegExp)实现

使用JavaScript,来实现JavaScript中的正则,RegExp in JavaScript,方便大家使用自己熟悉的语言调试

测试用例:

"/root/temp/hello.mp3".match(/.+\/(.+\..+)$/)

"noonday".match(/\B../)

"_foo0_(x,y)".match(/^([_a-zA-Z0-9]*)(?:\(.*\))/)

"_foo0_(x,y)".match(/^((?:[_a-zA-Z])+(?:[_a-zA-Z\d])*)(?:\((.*)\))?/)

"0_foo0_(x,y)".match(/^((?:[_a-zA-Z])+(?:[_a-zA-Z\d])*)(?:\((.*)\))?/) // no match

"_foo0_  (x,y)".match(/^((?:[_a-zA-Z])+(?:[_a-zA-Z\d])*)[ ]*(?:\((.*)\))?/)

About

JavaScript正则 JavaScript regexp 移植MuJS中的正则,使用JavaScript,来实现JavaScript中的正则,RegExp in JavaScript,方便大家使用自己熟悉的语言调试

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published