Home > Net >  Match words that contains characters in specific order by regex
Match words that contains characters in specific order by regex

Time:12-20

I have a problem finding words, that need to contain all these characters a, b, c in this specific order.

I know how to check occurrences at the words by [abc] regex. But, I don't know how to check that sequence part. Could you pls hint me up?

Can be:

  • vrabec
  • krabice
  • abeceda

Cannot be:

  • scrabble
  • publikace
  • dabra

CodePudding user response:

Would a simple .*a.*b.*c.* suffice?

  • Related