Menu

Please Help. Find and Replace

2008-04-15
2012-11-13
  • Nobody/Anonymous

    I have a large text. There are some lines like:
    prompt 100 records committed...
    ...
    prompt 300 records committed...
    ...
    prompt 723400 records committed...

    I need to replace 'prompt ??? records committed...' on '--'.
    How can i do this??

    Please Help.
    Alexander.

     
    • Fool4UAnyway

      Fool4UAnyway - 2008-04-15

      Press CTRL+Home to move the cursor to the start of the document.

      Press CTRL+R to open the advanced Find/Replace dialog.
      Check the Regular Expression checkbox, uncheck Selection.

      In the Find field, enter:
      ^prompt \d+ records committed.*$

      In the Replace field, enter:
      --

      Find the first occurrence and replace all/rest.

      ^_______ means the search text has to be at the beginning of the line
      \d+_____ means: search for any string of digits (\d = digit, + = at least one)
      .*______ means: any number of characters (. = any character, * = any number 0 - ... )
      $_______ means the line has to end here (but isn't necessary in this case)