Menu

search and replace random text

Rich
2015-05-29
2015-05-30
  • Rich

    Rich - 2015-05-29

    I need to replace all occurrences of this phrase <extern>0</extern> with nothing (delete the line). The problem is the "0" will be different on each entry. Is there a way to specify a wildcard to remove the entire line and the "0" in it?

    for example:

    Find What: <extern>(Any value here)</extern>

    Thanks

     
  • Robert

    Robert - 2015-05-30

    Find What: <extern>.*</extern>\R?
    Replace With: clear box

     
  • Andreas Jonsson

    Andreas Jonsson - 2015-05-30

    Note that "Regular expression" needs to be checked when doing the search and replace suggested by Robert.

    This is a very powerful feature which makes it possible to specify a lot of different wildcards. E.g if you only wanted to delete those lines where there is a single number between the externs:

    <extern>\d</extern>

    Or when there is at least one digit:

    <extern>\d+</extern>