You state that you are targeting a word on a string, so first set the bindings only for word processing:
\b[regex will go here]\b ^ ^ assert a word boundary
Further, the colon continued and was followed by [aeiou] with two more [aeiou] in the part following the colon. I assume that independent of the case?
(?i)(\b\w+[aeiou]):((?:[aeiou][^aeiou\s\W]*){3}\b) ^ match a character that is NOT vowel, space or not a ^ \W=[^a-zA-Z0-9_]
Demo
(Note the use of [^aeiou\W] , which is a consonant of letters, numbers and _, but not other symbols of the Demo .)
Python demo:
import re tests={ 'matches':[ 'we:aanyoh', 'hiru:atghigu', 'yo:ubeki' ], 'no match':[ 'wz:ubeki', 'we:a anyoh', 'yo:ubek', 'hiru:atghiguu' ] } for k, v in tests.items(): print k for e in v: s=re.sub(r'(?i)(\b\w+[aeiou]):((?:[aeiou][^aeiou\s\W]*){3}\b)', r'\1\2', e) print '\t{} > {}'.format(e, s)
Print
matches we:aanyoh > weaanyoh hiru:atghigu > hiruatghigu yo:ubeki > youbeki no match wz:ubeki > wz:ubeki we:a anyoh > we:a anyoh yo:ubek > yo:ubek hiru:atghiguu > hire:atghiguu
This will only process words with one colon. If you want to combine words with multiple colons, but have the same pattern, change the LH pattern to a character class that contains a colon and an anchor that is not \b .
Example: (?i)(^[\w:]+[aeiou]):((?:[aeiou][^aeiou\s\W]*){3}\b)