配置

regex是提供的正则工具


getGroup0

Desc:

return the group 0 value($0) if matched otherwise null if not matched

Params:

name type desc
regex string
content string

Return:

name type desc
string

getGroup1

Desc:

return the group 1 value($1) if matched otherwise null if not matched

Params:

name type desc
regex string
content string

Return:

name type desc
string

get

Desc:

return the special group value if matched otherwise null if not matched

Params:

name type desc
regex string
content string
groupIndex integer

Return:

name type desc
string

getAllGroups

Desc:

return all group value as List if matched otherwise null if not matched

Params:

name type desc
pattern string
content string

Return:

name type desc
array
string

extract

Params:

name type desc
regex string
content string
template string

Return:

name type desc
string

delFirst

Desc:

Remove the first subString of the input String that matches the pattern with the given replacement string.

Params:

name type desc
pattern string
content string

Return:

name type desc
string

delAll

Desc:

Remove the first subString of the input String that matches the pattern

Params:

name type desc
regex string
content string

Return:

name type desc
string

delBefore

Params:

name type desc
regex string
content string

Return:

name type desc
string

findAllGroup0

Params:

name type desc
regex string
content string

Return:

name type desc
array
string

findAllGroup1

Params:

name type desc
regex string
content string

Return:

name type desc
array
string

findAll

Params:

name type desc
regex string
content string
group integer

Return:

name type desc
array
string

findAll

Params:

name type desc
pattern object
  |─pattern string The original regular-expression pattern string.
  |─flags integer The original pattern flags.
content string
group integer

Return:

name type desc
array
string

count

Params:

name type desc
regex string
content string

Return:

name type desc
integer

contains

Params:

name type desc
regex string
content string

Return:

name type desc
object

isMatch

Params:

name type desc
regex string
content string

Return:

name type desc
object

replaceAll

Params:

name type desc
content string
regex string
replacementTemplate string

Return:

name type desc
string

escape

Desc:

escape for Regex keywords

Params:

name type desc
content string

Return:

name type desc
string