javaScript内置7.RegExp

属性:
$1, ..., $9 Parenthesized substring matches, if any.
$_ See input.
$* See multiline.
$& See lastMatch.
$+ See lastParen.
$` See leftContext.
$' See rightContext.
global Whether or not to test the regular expression against all possible matches in a string, or only against the first.
ignoreCase Whether or not to ignore case while attempting a match in a string.
input The string against which a regular expression is matched.
lastIndex The index at which to start the next match.
lastMatch The last matched characters.
lastParen The last parenthesized substring match, if any.
leftContext The substring preceding the most recent match.
multiline Whether or not to search in strings across multiple lines.
rightContext The substring following the most recent match.
source The text of the pattern.
方法:
compile Compiles a regular expression object.
exec Executes a search for a match in its string parameter.
test Tests for a match in its string parameter

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • **2014真题Directions:Read the following text. Choose the be...
    又是夜半惊坐起阅读 9,880评论 0 23
  • Lua 5.1 参考手册 by Roberto Ierusalimschy, Luiz Henrique de F...
    苏黎九歌阅读 13,905评论 0 38
  • 今天初中几个同学聚餐,我忽然来了下厨的兴致,居然惊艳了一把厨艺,真心觉得自己真的是有着多方面潜质的人。这么久的同学...
    兮兮0225阅读 145评论 0 0
  • iOS的几种数据持久化方案 plist文件(属性列表) preference(偏好设置) NSKeyedArchi...
    王蓝胖阅读 2,066评论 0 6
  • 我想我肯定是疯了,我竟然如此万劫不复的想你,思念的杂草还是茂盛得很,我都快忍不住给你信息:我想你了,抽个时间来见我...
    六月偏执狂阅读 1,564评论 0 0