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

Re: [Clip] triple consonants

Expand Messages
  • Sheri
    ... You could try something like this: ^!Replace (?i)(? (?![aeiou])( pL) 1{2}) $1 RAWS or to disallow mixed case triples: ^!Replace
    Message 1 of 9 , Feb 1, 2010
    • 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
    • Axel Berger
      ... Thanks, that s it. I ve modified it slightly to come up with: ^!Replace (f|l|m|n|p|r|t) 1{2}([aeiouäöü]) $1$1$2 HRASTI Danke Axel
      Message 2 of 9 , Feb 1, 2010
      • 0 Attachment
        diodeom wrote:
        > This seems to do the trick for me:
        > ^!Replace "([flmnprt])(\g1)\g1" >> "$1$2" WARIS

        Thanks, that's it. I've modified it slightly to come up with:

        ^!Replace "(f|l|m|n|p|r|t)\1{2}([aeiouäöü])" >> ""$1$1$2" HRASTI

        Danke
        Axel
      Your message has been successfully submitted and would be delivered to recipients shortly.