wild card searching

Ron N.
  • Ron N.

    Ron N. - 2013-05-21

    I am searching for the term "CHAPTER 4", numerically the number will increase into the trip digits.

    I did ctl f - turned on extended and typed "CHAPTER \d###" and lots of similar variations. When it searches it finds nothing. I know this has got to be a stupid error on my part. What am I doing wrong pls.

    Thanks Ron


    THEVENOT Guy - 2013-05-21

    Hi Ron N.,

    Actually, in extended mode, in addition to the search of particular characters, below :

    Character Syntax
    Tabulation \t
    New Line \n
    Carriage Return \r
    Backslash \\
    Null \0

    a particular byte can be find with one of the four syntaxes below :

    Type From To Car.
    DECIMAL \d000 \d255 [0-9]
    OCTAL \o000 \o377 [0-7]
    BINARY \b00000000 \b11111111 [0-1]
    HEXADECIMAL \x00 \xFF [0-9A-F]

    So, for example, if you're searching for the 'A' character, you can choose between :

    the form \d065 or the form \o101 or the form \b1000001 or the form \x41

    And, if you're searching for character, with ASCII code 201, you'll type :

    the form \d201 or the form \o311 or the form \b11001001 or the form \xC9

    Note that I didn't speak of the real character displayed, which is different, according to your actual encoding ( ANSI, UNICODE, UTF-8, OEM850...)

    But, the search concerns a particular code point and generic search for any number, for example, can't be achieved with extended mode !

    To search for any number after the word CHAPTER, you need to use the Regular expression mode :

    Just type  CHAPTER \d+  in the SEARCH dialog, with a space, after the word CHAPTER

    Note : \d represent any digit, from 0 to 9 and the + symbol means that the digit can be present, once, at least, so the form \d+ represents any integer number (\d or \d\d or \d\d\d ...)

    Tick the Match case box if you ONLY want the form CHAPTER
    Don't tick the Match case box if you want any form like Chapter, chapter or even chapTER !

    I hope these explanations will be useful to you !



    P.S. :

    You will find good documentation, about the new PRCE Regular Expressions,
    used by N++, since the 6.0 version, at the TWO addresses below :



    The FIRST link concerns the syntax of regular expressions in SEARCH

    The SECOND link concerns the syntax of regular expressions in REPLACEMENT

    Last edit: THEVENOT Guy 2013-05-21
  • Ron N.

    Ron N. - 2013-05-22

    Awesome! I have over 32k lines to go thru and this helped a lot. I love good documentation so I really appreciate the links. I have a bunch of other editing to do to, so I better get to reading.

    thanks again, ron


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks