Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 01-04-2005, 01:49 PM   #1
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
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...
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.


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 02:36 PM
Need help with Regular Expression subaruwrx Linux - Newbie 6 09-04-2004 07:48 PM
Regular Expression Help WeNdeL Linux - General 1 08-14-2003 10:08 AM
Regular Expression slizadel Programming 4 07-28-2003 05:16 AM
regular expression gumby Programming 3 07-15-2003 12:13 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:13 AM.

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