Tapatalk

German "Umlaute" in regular expressions

German "Umlaute" in regular expressions

2
NewbieNewbie
2

    Feb 24, 2016#1

    Hi,

    I am from Germany and I try to build a regular expression to find and replace in text with the "German Umlaute" äüöß

    Example text:

    Code: Select all

    Hier ist es wunderbar und Klaus will noch bleiben!
    Hier ist es schön und Biggi will bleiben!
    Hier ist es häßlich und Rainer will gehen!
    Now I will search and replace in the text and keep the fourth word with this regular expression:

    Code: Select all

    Hier ist es  ^([a-z]+^) und ^([a-z]+^)!
    This does not work because the fourth word contains German umlauts. How can I fix it?

    Greetings from Germany

    6,685587
    Grand MasterGrand Master
    6,685587

      Feb 25, 2016#2

      With UltraEdit or Unix regular expression simply use [a-zäöüß]+ instead of [a-z]+ in search string of a case-insensitive search. And with Perl regular expression use [[:alpha:]]+ instead of [a-z]+ to find 1 or more alphabetic characters according to Unicode. See also Regex to find words with at least 1 alphabetic and 1 digit?
      Best regards from an UC/UE/UES for Windows user from Austria

      2
      NewbieNewbie
      2

        Feb 29, 2016#3

        Hi Mofi,
        Thank u very much for your answer. It works.
        And it is logic. Next time I will think before I ask stupid questions ... :-))))

        Greetings from Germany
        Gregor