How to remove let's say 2 last characters in each line

How to remove let's say 2 last characters in each line

9
NewbieNewbie
9

    Dec 31, 2004#1

    1. Is it possible to remove some characters on end of each line
    2. The same question but for replace

    Thanks.

    206
    MasterMaster
    206

      Dec 31, 2004#2

      Unix Regular Expression Mode Active Advanced > Configuration > Find

      Search String: ^(.+)..$

      Remove last two:
      Replace String: \1

      Replace last two (with ZZ, for example):
      Replace String: \1ZZ
      Software For Metalworking
      http://closetolerancesoftware.com

      9
      NewbieNewbie
      9

        Jan 03, 2005#3

        Thanks.

        I found out that for ex. to delete 2 last characters this can be used:
        ..$ and replace with nothing.
        One more question:
        If on end of line I have numbers with different length for ex. from 1 to 4 numbers how can I delete only those numbers.
        qqqqq112
        wwwww2345
        eeeee1
        etc

        Thank You

        206
        MasterMaster
        206

          Jan 03, 2005#4

          \d represents a digit from 0-9
          $ represents the end of the line

          \d$ represents a digit at the end of the line

          \d+$ represents one or more consecutive digits at the end of the line


          I would try:
          Search: \d+$
          Replace: Nothing


          Unix regular expression mode
          Software For Metalworking
          http://closetolerancesoftware.com

          9
          NewbieNewbie
          9

            Jan 04, 2005#5

            Thank You