package mutator
- Alphabetic
- Public
- Protected
Value Members
- object BOL2BOI extends TokenMutator
Change beginning of line
^
to beginning of input
\AChange beginning of line
^
to beginning of input
\AMutation level(s): 2, 3
^a
⟶
\Aa
Example: - object BOLRemoval extends TokenMutator
Remove beginning of line character
^
Remove beginning of line character
^
Mutation level(s): 1, 2, 3
^a
⟶
a
Example: - object BuiltinMutators
The object that manages all built-in token mutators
- object BuiltinMutatorsJS
A wrapper class for weaponregex.mutator.BuiltinMutators for exporting to JavaScript
A wrapper class for weaponregex.mutator.BuiltinMutators for exporting to JavaScript
- Annotations
- @JSExportTopLevel("BuiltinMutators") @JSExportAll()
- object CharClassAnyChar extends TokenMutator
Change character class to match any character [\w\W]
Change character class to match any character [\w\W]
Mutation level(s): 2, 3
[abc]
⟶[\w\W]
Example: - object CharClassChildRemoval extends TokenMutator
Remove a child from character class
Remove a child from character class
Mutation level(s): 2, 3
[abc]
⟶[ab]
,[ac]
,[bc]
Example: - object CharClassNegation extends TokenMutator
Negate character class
Negate character class
Mutation level(s): 1
[abc]
⟶[^abc]
Example: - object CharClassRangeModification extends TokenMutator
Modify the range inside the character class by increasing or decreasing once
Modify the range inside the character class by increasing or decreasing once
Mutation level(s): 3
[b-y]
⟶[a-y]
,[c-y]
,[b-x]
,[b-z]
Example: - object EOL2EOI extends TokenMutator
Change end of line
$
to end pf input\z
Change end of line
$
to end pf input\z
Mutation level(s): 2, 3
a$
⟶a\z
Example: - object EOLRemoval extends TokenMutator
Remove end of line character
$
Remove end of line character
$
Mutation level(s): 1, 2, 3
a$
⟶a
Example: - object GroupToNCGroup extends TokenMutator
Modify capturing group to non-capturing group
Modify capturing group to non-capturing group
Mutation level(s): 2, 3
(abc)
⟶(?:abc)
Example: - object LookaroundNegation extends TokenMutator
Negate lookaround (lookahead, lookbehind) constructs
Negate lookaround (lookahead, lookbehind) constructs
Mutation level(s): 1, 2, 3
(?=abc)
⟶(?!abc)
Example: - object POSIXCharClassNegation extends TokenMutator
Negate POSIX character class
Negate POSIX character class
Mutation level(s): 1
\p{Alpha}
⟶\P{Alpha}
Example: - object PredefCharClassAnyChar extends TokenMutator
"Add the negation of that predefined character class to match any character
[\\w\\W]
""Add the negation of that predefined character class to match any character
[\\w\\W]
"Mutation level(s): 2, 3
\d
⟶[\d\D]
Example: - object PredefCharClassNegation extends TokenMutator
Negate predefined character class
Negate predefined character class
Mutation level(s): 1
\d
⟶\D
Example: - object PredefCharClassNullification extends TokenMutator
Nullify a predefined character class by removing the
\
Nullify a predefined character class by removing the
\
Mutation level(s): 2, 3
\d
⟶d
Example: - object QuantifierNChange extends TokenMutator
Change quantifier
{n}
to{0,n}
, and{n,}
Change quantifier
{n}
to{0,n}
, and{n,}
Mutation level(s): 2, 3
a{5}
⟶a{0,5}
,a{5,}
Example: - object QuantifierNMModification extends TokenMutator
Modify quantifier
{n,m}
to{n-1,m}
,{n+1,m}
,{n,m-1}
, and{n,m+1}
Modify quantifier
{n,m}
to{n-1,m}
,{n+1,m}
,{n,m-1}
, and{n,m+1}
Mutation level(s): 2, 3
a{5,10}
⟶a{4,10}
,a{6,10}
,a{5,9}
,a{5,11}
Example: - object QuantifierNOrMoreChange extends TokenMutator
Change quantifier
{n,}
to{n}
Change quantifier
{n,}
to{n}
Mutation level(s): 2, 3
a{5,}
⟶a{5}
Example: - object QuantifierNOrMoreModification extends TokenMutator
Modify quantifier
{n,}
to{n-1,}
, and{n+1,}
Modify quantifier
{n,}
to{n-1,}
, and{n+1,}
Mutation level(s): 2, 3
a{5,}
⟶a{4,}
,a{6,}
Example: - object QuantifierReluctantAddition extends TokenMutator
Add reluctant quantifier type to greedy quantifier
Add reluctant quantifier type to greedy quantifier
Mutation level(s): 3
a+
⟶a+?
Example: - object QuantifierRemoval extends TokenMutator
Remove any type of quantifier including
?
,*
,+
, and{n,m}
Remove any type of quantifier including
?
,*
,+
, and{n,m}
Mutation level(s): 1
a*
⟶a
Example: - object QuantifierShortChange extends TokenMutator
Change quantifier
*
,+
to{n}
Change quantifier
*
,+
to{n}
Mutation level(s): 2, 3
a*
⟶a{0}
Example: - object QuantifierShortModification extends TokenMutator
Modify quantifier
?
,*
,+
to{n,}
, or{n,m}
Modify quantifier
?
,*
,+
to{n,}
, or{n,m}
Mutation level(s): 2, 3
a*
⟶a{1,1}
,a{0,0}
,a{0,2}
Example: