moving the first occurance of a pattern to a fixed position
Posted: Sat Jan 26, 2013 12:55 am
I have a list of keywords followed by data:
Date:1/25/2013 10:37:09 AM
Event ID:902
Task Category:None
Level:Information
Keywords:Classic
User:N/A
I want to move everything following the first colon to my tab location, (40)
select ^(.*:)(.*)
replace /1/t/2
This seemed to work until I realized the split was occurring at the position of the last colon, not the first occurrence
I have also tried using (^.*:)(.*) and (.*:)(.*).
All three methods give identical results
Date:1/25/2013 10:37:09 AM
Event ID:902
Task Category:None
Level:Information
Keywords:Classic
User:N/A
I want to move everything following the first colon to my tab location, (40)
select ^(.*:)(.*)
replace /1/t/2
This seemed to work until I realized the split was occurring at the position of the last colon, not the first occurrence
I have also tried using (^.*:)(.*) and (.*:)(.*).
All three methods give identical results