Prev: How to Set Password to Accept Changes
Next: Create an association in the folder option control panel.
From: msnyc07 on 11 May 2010 13:05 I am trying to replace spaces with tabs where the format is something like 12.2121 19.2141 12.2121 19.2141 and I can't just search on 5 spaces and replace with tab because there are other occurences of multiple spaces in the document so I need to pattern match. I got this far [0-9] [0-9][0-9].[0-9] but am not sure what to put in replace. I was hoping [0-9]^t[0-9][0-9].[0-9] meaning keep what was there but use tab instead which doesn't work. Pretty sure there was a way to say ok now that you found the pattern, just replace (this) Any help appreciated.
From: msnyc07 on 11 May 2010 13:14
Never mind thanks, answered my own question, for anyone who is curious; Separate the three parts of the search with paretheses in order to identify them; ([0-9])( )([0-9][0-9].[0-9]) then did replace as /1^t/3 meaning use the first pattern as is, then add a tab, then use the 3rd part as is. Nice stuff. "msnyc07" wrote: > I am trying to replace spaces with tabs where the format is something like > > 12.2121 19.2141 > 12.2121 19.2141 > > and I can't just search on 5 spaces and replace with tab because there are > other occurences of multiple spaces in the document so I need to pattern > match. I got this far > > [0-9] [0-9][0-9].[0-9] > > but am not sure what to put in replace. > > I was hoping > > [0-9]^t[0-9][0-9].[0-9] > > meaning keep what was there but use tab instead which doesn't work. Pretty > sure there was a way to say ok now that you found the pattern, just replace > (this) > > Any help appreciated. > |