Loading ...
Sorry, an error occurred while loading the content.

20293Re: [Clip] triple consonants

Expand Messages
  • Sheri
    Feb 1 6:27 AM
    • 0 Attachment
      On 2/1/2010 4:03 AM, Axel Berger wrote:
      > I want to find triple consonants like fff through Regex. Instead of the
      > obvious way I tried to be clever, which of course backfired. The term
      >
      > (f|l|m|n|p|r|t){3}
      >
      > finds three consonants in a row, even if they're different. Is there a
      > clever alternative to
      >
      > (fff|lll|...)? The main reason I ask is not cleverness for its own sake
      > but that I need a single found consonant in my replace string, i.e. for
      > "fff" I need "f" and so on.
      >
      > Thanks
      > Axel
      >
      >

      You could try something like this:

      ^!Replace "(?i)(?>(?![aeiou])(\pL)\1{2})" >> "$1" RAWS

      or to disallow mixed case triples:

      ^!Replace "(?>(?![AEIOUaeiou])(\pL)\1{2})" >> "$1" RAWS

      Regards,
      Sheri
    • Show all 9 messages in this topic