Menu

How to remove everything before a certain string in a line?

2013-01-01
2013-01-04
  • googlealchemist

    googlealchemist - 2013-01-01

    I know how to remove everything AFTER a certain string in each line using this as an example...if I have a bunch of lines each containing 'action=' and I want to keep everything before that, but delete everything after it...

    action=. in find and replace would remove everything after action=

    But how do i reverse this? I have tried different variations of that but can't get it to work...what would I use to do this?

    Thanks

     
  • cchris

    cchris - 2013-01-04

    Search ^(.?)your_string(.)
    Replace with your_string\2
    Or just \2 if your_string isn't to be kept.

    For this to work, use regular expressions, and uncheck the ". matches newline" option.

    CChris

     
Auth0 Logo