Would this work?
REGEX PATTERN (PRCE2 Flavor)(Flags: Global (g))
(?=.*?(?P<a>A)?.*)(?=.*(?P<b>B).*)?(?=.*(?P<c>C).*)?
Regex demo: https://regex101.com/r/1oYDOF/1
NOTES:
?
to make .*
lazy, .*?
?
behind every lookahead group to make them optional.Great question! I did not know you can capture strings with lookahead. Fantastic!!!! This question opened a whole new world for me in regex. Thank you!