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

Re: [Clip] triple consonants

Expand Messages
  • Axel Berger
    ... Yes it does. I know I said I wanted to find just the single letter, but my first attempt would have inserted it twice. The extra double quote too was part
    Message 1 of 9 , Feb 1, 2010
    • 0 Attachment
      John Shotsky wrote:
      > Does that really work?

      Yes it does. I know I said I wanted to find just the single letter, but
      my first attempt would have inserted it twice. The extra double quote
      too was part of the replace string to be written. The result is TeX
      notation for hyphenation in traditional German spelling. Whenever three
      identical consonants are follwed by a vowel in composite words, only two
      are written, but the third is resurrected in hyphenation. Thus in bed
      sheet "Bett" plus "Tuch" become Bettuch and are hypenated Bett-tuch.

      > How about other accented vowels, as in sauté?
      > What if there are 4 or 5 of the wanted consonants in succession?

      Neither is possible in the spelling of German words.

      Danke
      Axel
    • Sheri
      ... You could try something like this: ^!Replace (?i)(? (?![aeiou])( pL) 1{2}) $1 RAWS or to disallow mixed case triples: ^!Replace
      Message 2 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 3 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.