Forum: MemoQ support
Topic: Does anyone know how I combine my two regular expressions?
Poster: Gjorgji Apostolovski
Post title: only on begining
[quote]Stepan Konev wrote:
[quote]Gjorgji Apostolovski wrote:
He is probably trying to find words with 6-30 characters containing alpha, beta, gamma.[/quote]No. I do understand the purpose: 7 to 31 words. For this purpose you have to search for n-1 words followed by a space character. [/quote]
Something like this:
(alpha|beta|gamma)[A-Za-z]{6,30}
But this will find words with 6-30 letters only if they are beginning with the words alpha, beta, or gamma.
It will not find words with alpha, beta, or gamma in the middle or in the end of the word or the string.
This will find words with 7-31 letters with word "alpha" in the middle, but not in the beginning.
(\w)(alpha)(?=\w){6,30}
This will find words with 7-31 letters with word "alpha" in the beginning.
(alpha)(?=\w){6,30}
[Edited at 2024-12-08 13:46 GMT]
[Edited at 2024-12-08 13:51 GMT]
Topic: Does anyone know how I combine my two regular expressions?
Poster: Gjorgji Apostolovski
Post title: only on begining
[quote]Stepan Konev wrote:
[quote]Gjorgji Apostolovski wrote:
He is probably trying to find words with 6-30 characters containing alpha, beta, gamma.[/quote]No. I do understand the purpose: 7 to 31 words. For this purpose you have to search for n-1 words followed by a space character. [/quote]
Something like this:
(alpha|beta|gamma)[A-Za-z]{6,30}
But this will find words with 6-30 letters only if they are beginning with the words alpha, beta, or gamma.
It will not find words with alpha, beta, or gamma in the middle or in the end of the word or the string.
This will find words with 7-31 letters with word "alpha" in the middle, but not in the beginning.
(\w)(alpha)(?=\w){6,30}
This will find words with 7-31 letters with word "alpha" in the beginning.
(alpha)(?=\w){6,30}
[Edited at 2024-12-08 13:46 GMT]
[Edited at 2024-12-08 13:51 GMT]