Delete text before spaces(tab) using regex
5,391
Use Replace, select the Regular Expression option, enter
^.* + (if you only need to remove spaces)
or
^.*[ ,\t]+ (if you need to remove tabs also)
in the "Find what" field and nothing in the "Replace with" field
Caveat: If you have a line like
1234 afe ngh
only ngh would remain
Related videos on Youtube
Author by
Perkan
Updated on September 18, 2022Comments
-
Perkan over 1 year
I have a small problem.Tried looking for some solutions but couldn't find any. I have a big document that has data like this:
0002ssap 10763 0003 0003 0003 33699425 0003 3557471 00031 00000
I want to delete everything before the 2nd text part so it looks like this:
10763 0003 33699425 3557471 00000
Thanks
-
Perkan almost 7 yearsI tried your solution but I end up with something like this prntscr.com/f8te9e It says 87 occurrences but the document has few million lines and every line is similar (data1 data2)
-
whatever almost 7 yearsmhh, could it be many of these are actually tabs and not whitespaces? In that case try
^.*[ ,\t]+
. You can check whether they are tabs or whitespaces by selecting "Show All characters" from the View-> Show Symbol menu -
Perkan almost 7 yearsThe second solution worked like a charm. Thanks for the help, You saved me few years of work :D
-
whatever almost 7 yearsYou're welcome. :) Will edit the answer