UltraEdit regex to remove all words which contain number

UltraEdit regex to remove all words which contain number

1
NewbieNewbie
1

    Jul 21, 2015#1

    How to make an UltraEdit regex which allows me to remove all words of a text file containing a number.

    For example:

    Code: Select all

    test
    test2
    t2est
    te2st
    te5st
    and get only

    Code: Select all

    test

    6,686585
    Grand MasterGrand Master
    6,686585

      Jul 22, 2015#2

      A case-insensitive search with Perl regular expression search string \<[a-z]+\d\w*\> finds entire words containing at least 1 digit.

      \< ... beginning of a word. \b for any word boundary could be also used.

      [a-z]+ ... any letter 1 or more times. You can put additional characters into the square brackets like ÄÖÜäöüß also used in language of text file.

      \d ... any digit, i.e. 0-9.

      \w* ... any word character 0 or more times. Any word character means all word characters according to Unicode table which includes language dependent word characters, all digits and the underscore.

      \> ... end of a word. \b for any word boundary could be also used.

      A case-insensitive search with UltraEdit regular expression search string [a-z]+[0-9][a-z0-9_]++ finds also entire words containing at least 1 digit if additionally the find option Match whole word is also checked.

      [a-z]+ ... any letter 1 or more times. You can put additional characters into the square brackets used in language of text file.

      [0-9] ... any digit.

      [a-z0-9_]++ ... any letter, digit or underscore 0 or more times.

      The UltraEdit regexp search string [a-z]+[0-9][a-z0-9_]++ in Unix/Perl syntax would be [a-z]+[0-9][a-z0-9_]* which could be also used with find option Match whole word checked instead of the Perl regexp search.
      Best regards from an UC/UE/UES for Windows user from Austria