expression to find a string of greek text

expression to find a string of greek text

3
NewbieNewbie
3

    Aug 09, 2015#1

    conditions:
    1. it consists of 5 or more (greek) lower case characters (greek [α-ω] equals to [a-z])
    2. followed by an empty space
    3. followed by any of the words (I use english characters for your convenience): mou, sou, tou, tis, mas, sas, tous

    For example, the expression should match the text in bold in the following (random) strings:
    aekotino mas
    termonisa souba
    (revinami mou).

    Can some one help me, please?

    6,604548
    Grand MasterGrand Master
    6,604548

      Aug 09, 2015#2

      Search string with Perl regular expression: [a-z]{5,} (?:mou|sou|tou|tis|mas|sas|tous)

      [a-z] ... any letter in this character set. You have to use [α-ω] instead which should work according to Greek letters in Unicode table.

      {5,} ... at least 5 characters.

      Next character is a space character. But you could also use \s+ for any whitespace character including carriage return and line-feed one or more times.

      (?:...) ... a non capturing group for the OR expression.

      mou|sou|tou|tis|mas|sas|tous ... an OR expression for those 7 strings.
      Best regards from an UC/UE/UES for Windows user from Austria

      3
      NewbieNewbie
      3

        Aug 09, 2015#3

        Excellent!
        Thank you!