Author Topic: Find and Replace special characters  (Read 6361 times)

rpoulin

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Find and Replace special characters
« on: April 30, 2007, 04:10:36 pm »
I have search for this topic but did not find anything. Sorry if this question have been asked before.

How do we find and replace for special characters in text. Exemple: i want to replace all of the tab codes with a return code:

Exemple: i have this text:
 
admtray.exe    adobecollabsync.exe    adservice.exe
adskscsrv.exe    adsser~1.exe    adusermon.exe

I want to get :

admtray.exe
adobecollabsync.exe
adservice.exe
adskscsrv.exe
adsser~1.exe
adusermon.exe

-----
I guest a simple find and replace "tabs" by "end of line" will do the trick. How?

Thanks



 


jbhurst

  • Senior Community Member
  • Posts: 405
  • Hero Points: 33
Re: Find and Replace special characters
« Reply #1 on: April 30, 2007, 06:36:26 pm »
Hi,

The trick to these situations is to use a regular expression based search and replace. Try this on the command line:

c/\t/\n/u


The 'c' is for the Change command; the slashes delimit the search string, replacement and options; the \t and \n are tab and newline; the 'u' at the end instructs SlickEdit to use "UNIX" style regular expressions. Check the online help for a list of regular expression characters.

John Hurst
Wellington, New Zealand

rpoulin

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Re: Find and Replace special characters
« Reply #2 on: May 01, 2007, 12:59:36 am »
Nice  --- THank You.  :D