LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 01-04-2005, 02:49 PM   #1
apachedude
Member
 
Registered: Aug 2004
Location: California
Distribution: SuSE 10.0 (SUPER)
Posts: 356

Rep: Reputation: 31
Kate - Regular Expression Replace and Other Features?


My favorite text editor, UltraEdit, unfortunately only runs on Windows. I have found Kate to be a suitable replacement, but it is not nearly as powerful as UltraEdit.

The first feature I miss is regular expression replace--I have a feeling that the feature exists, it's just that I haven't been using Kate correctly. As you probably know, Kate offers regular expression find. But it doesn't seem to offer regular expression replace. For example, if I check the Regular Expression option, with
Quote:
Find: <br>
Replace: \n
I just get the literal \n, as though I had typed in \\n instead (\\ being the escape sequence for \). Similarly, other escape sequences don't work.

In a similar vein, regular expressions--at least its implementation in UltraEdit would allow me to do something like...
Quote:
Find: ([a-z]+) ([a-z]+)
Replace: \2 \1
This would switch foo bar with bar foo.

UltraEdit, however, is limited in its regular expression capacity. It does not allow for quantifiers such as {3,}--a feature I hope to eventually see in Kate some day.

The second feature that I miss are column edit--by which you can select an entire column of a text file, instead of a row. It allows you to, for instance, add the <li> tag in front of all items of a text list if you were to convert it to html. Or to add tabs in front of a series of selected lines to clean up your code.

The final feature is find and replace capacity for all open files. Often times, I might have, for instance, a bunch of HTML files whose HTML tags I want to strip. I just do a series of find and replace to remove the HTML tags, the comments, and the escape sequences and enter the proper white space for <p> and <br>. Granted, there are other ways to convert HTML to text, but find and replace all open files comes in handy for other reasons as well.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
regular expression search/replace question (HELP!!! :) amytys Programming 5 09-06-2004 03:36 PM
Need help with Regular Expression subaruwrx Linux - Newbie 6 09-04-2004 08:48 PM
Regular Expression Help WeNdeL Linux - General 1 08-14-2003 11:08 AM
Regular Expression slizadel Programming 4 07-28-2003 06:16 AM
regular expression gumby Programming 3 07-15-2003 01:13 PM


All times are GMT -5. The time now is 03:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration