Menu

Wildcard for Replace

2007-08-23
2012-11-13
  • Nobody/Anonymous

    Hi,
    is it possible to search (and replace) with wildcards.
    For example:

    Text:
    abc="10"
    abc="klm"
    abc="99"

    And the search with Wildcards would be:

    abc="<wildcard>"

    A Wildcard is vor example (in other programms): *
    So the searchtherme would be:

    abc="*"

    And it finds all 3 lines in the text above.

    Greats,
    Stefan

     
    • pshute

      pshute - 2007-08-24

      You'll need to use Regular Expression mode (there's a box to tick in the find/replace dialog).  Then you'd search for:
      abc=.*

      Not sure if you can say:
      abc=".*"
      You might have to use:
      abc=\".*\"
      if you need the quotes in there.

      Have a read of http://notepad-plus.sourceforge.net/uk/regExpList.php for how to use regular expressions.  They're very different from basic Windows style wildcards.  If you haven't used them before you won't be able to guess how to use them, so read the notes first.

       
      • Nobody/Anonymous

        Oh this is nice, thanks.
        I know a program with similar wildcards and don't think there will be problems.