Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
たとえば、文字のセットが{A、B、C}の場合、一致させたい
A、B、C、AB、AC、BC、ABC
基本的にすべての組み合わせ (空の文字列を除く) は、置換なしでセットから取得されます。
編集: POSIX "grep -E" で実行できるようにしたいと思います。
試す:
^(([abc])(?!.*\2))*$
デモ