Difference between revisions of "Remove everything before a specific character"
From Tech-Wiki
(4 intermediate revisions by one other user not shown) | |||
Line 7: | Line 7: | ||
* In '''Find what:''' string write the following regex pattern | * In '''Find what:''' string write the following regex pattern | ||
− | '''^.+[< | + | '''^.+[<Character to find>]''' |
* Leave the '''Replace with :''' string blank | * Leave the '''Replace with :''' string blank | ||
Line 13: | Line 13: | ||
---- | ---- | ||
+ | |||
'''Explanation of Regular Expression''' | '''Explanation of Regular Expression''' | ||
− | + | ^ Beginning of the string | |
− | ^ Beginning of the string | + | . Any character |
− | + | + One or more the previous character | |
− | . Any character | + | [ ] One character of |
− | + | ||
− | + One or more the previous character | + | |
− | + | ||
− | [ ] One character of | + |
Latest revision as of 01:42, 8 August 2016
- In an open document
- press Ctrl-H
- Set the search Mode to Regular expression
- In Find what: string write the following regex pattern
^.+[<Character to find>]
- Leave the Replace with : string blank
- Press Replace or Replace All
Explanation of Regular Expression
^ Beginning of the string . Any character + One or more the previous character [ ] One character of