RegexMutators

Stryker supports a variety of regular expression mutators, which are listed below. Do you have a suggestion for a (new) mutator? Feel free to create an issue!

Common tokens

OriginalMutated
[abc][^abc]
[^abc][abc]
\d\D
\D\d
\w\W
\W\w
\s\S
\S\s

Anchors

OriginalMutated
^abcabc
abc$abc
\Aabcabc
abc\Zabc
abc\zabc
abc\babc
abc\Babc
\Gabcabc
abc*abc
abc?abc
abc+abc

Quantifiers

OriginalMutated
abc{5}abc
abc{5,}abc
abc{5,8}abc
abc{5,8}abc{4,8}
abc{5,8}abc{6,8}
abc{5,8}abc{5,7}
abc{5,8}abc{5,9}
abc{5,}abc{4,}
abc{5,}abc{6,}

Group constructs

OriginalMutated
(?=abc)(?!abc)
(?!abc)(?=abc)
(?<=abc)(?<!abc)
(?<!abc)(?<=abc)