Forum: MemoQ support
Topic: Does anyone know how I combine my two regular expressions?
Poster: Stepan Konev
Post title: Regex for 3 words in random order in a segment 7 to 31 chars
[quote]Fredrik Pettersson wrote:
a) The segment is allowed to be minimum 7 words long and maximum 31 words long. b) All three words must appear somewhere in the segment.[/quote]Ok, try this one (case-insensetive; if you need it to be case-sensitive, remove the (?i) component):
(?i)^(?=.*\balpha\b)(?=.*?\bbeta\b)(?=.*?\bgamma\b).{7,31}$
Edit: Add $ at the end
[Edited at 2024-12-08 12:45 GMT]
Topic: Does anyone know how I combine my two regular expressions?
Poster: Stepan Konev
Post title: Regex for 3 words in random order in a segment 7 to 31 chars
[quote]Fredrik Pettersson wrote:
a) The segment is allowed to be minimum 7 words long and maximum 31 words long. b) All three words must appear somewhere in the segment.[/quote]Ok, try this one (case-insensetive; if you need it to be case-sensitive, remove the (?i) component):
(?i)^(?=.*\balpha\b)(?=.*?\bbeta\b)(?=.*?\bgamma\b).{7,31}$
Edit: Add $ at the end
[Edited at 2024-12-08 12:45 GMT]