Menu

Wildcards

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

    Hi, I'm pretty new to Notepad++, and am getting to know the regular expressions.

    One thing, I can't figure out how to do this.

    Say I have the text abc="123", but I want it to say xyz="123", IE: changing the string name. Any idea's on how to do this?

     
    • Nobody/Anonymous

      Let me correct myself. I meant I want the string to be ' xyz="123" /> '

       
    • Nobody/Anonymous

      It seems that all you need to replace. You can type Ctrl-H to bring up the replace dialog box.

      Enter 'abc="123"' in the 'Find what' box, enter 'xyz="123" />' in the 'Replace with' box.

      If you want to use Regular Expression, make sure you tick the 'Regular expression' check box.

      Cheers

       
    • Nobody/Anonymous

      Ah. I forgot to add that the "123" isn't consistant throughout the file

       
      • Nobody/Anonymous

        Here is a quick tour of regular expression that NPP supports.

        Cheers

         
    • Nobody/Anonymous

      Search: abc(=\"(0-9]+\")
      Replace: xyz\1

       
MongoDB Logo MongoDB