Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Reg Ex find numbers stored as character in excel

    Help wanted · · · – – – · · ·
    2
    7
    1029
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Sander Hye Ehmsen
      Sander Hye Ehmsen last edited by

      Hi all

      I hope you can help me with my question. I want to search through a directory to find ‘numbers’ of the form dd-mm-yy(\d){4} where dd stands for date (eg 31), mm for month (12) and yy for year (86). (and sometimes there is a ‘-’ between the yy and the last for digits.

      I seems pretty simple to simply do
      ([0-3])\d{1}([0-1])\d{3}([-]){0,1}\d{4}.
      This however does not seem to find all the digits in excel stored as character. How can I possible specify that I mean the character in the range [0-3]?
      I have tried the dumb way to write the reg ex as ([0-3])([0-9])([0-1])([0-9])([-]){0,1}([0-9]){4} but this too does not find digits stored as numbers.

      Any thoughts of how to find these?

      1 Reply Last reply Reply Quote 0
      • 오바마
        오바마 last edited by

        Excel ?

        You have to use some other routes
        for instance, COM PIA or OOXML something

        Notepad++ is just an editor (as far as I know)

        1 Reply Last reply Reply Quote 0
        • Sander Hye Ehmsen
          Sander Hye Ehmsen last edited by

          @오바마 said:

          Excel ?

          You have to use some other routes
          for instance, COM PIA or OOXML something

          Notepad++ is just an editor (as far as I know)

          Notepad++ is way more than an editor. Check this out:
          https://www.ghacks.net/2016/09/16/use-notepad-to-find-text-in-all-files-of-a-folder/
          :-)

          오바마 1 Reply Last reply Reply Quote 0
          • 오바마
            오바마 @Sander Hye Ehmsen last edited by

            @Sander-Hye-Ehmsen

            I just visited the link you posted.
            So, what’s the point ?
            I have failed to find that Notepad++ could handle ‘xls/xlsx’ formats there.

            Of course, I could be wrong, my knowledge is limited.
            If you show me the right link, I’ll visit it again.

            Thanks.

            Ah, If I were you, I will use VBA.

            1 Reply Last reply Reply Quote 1
            • Sander Hye Ehmsen
              Sander Hye Ehmsen last edited by

              @오바마 said:

              I have failed to find that Notepad++ could handle ‘xls/xlsx’ formats there.

              Of course, I could be wrong, my knowledge is limited.
              If you show me the right link, I’ll visit it again.

              I have discovered that as xlsx is just a .zip-file, notepad++ has hard times searching through it.
              I thus need to use another program - maybe grepwin.

              오바마 1 Reply Last reply Reply Quote 1
              • 오바마
                오바마 @Sander Hye Ehmsen last edited by

                @Sander-Hye-Ehmsen
                that means you have to use OOXML
                or different 3rd parties tool…
                whatever it is, Notepad++ itself is not enough.

                Good Luck

                오바마 1 Reply Last reply Reply Quote 1
                • 오바마
                  오바마 @오바마 last edited by

                  @오바마
                  and from time to time
                  ADODB is not so bad choice, I liked it.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright © 2014 NodeBB Forums | Contributors