LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-24-2005, 05:54 AM   #1
Mr T Donegal
Member
 
Registered: Feb 2004
Location: Netherlands
Distribution: Suse 9.3
Posts: 31

Rep: Reputation: 15
Regular Expressions in Quanta Web Editor


I am trying to search for Line Breaks, and or Carriage Returns in Quanta web editor.

Unfortunately I cannot get this to work

I am opening the Find Dialog (Ctrl-F), I tick the 'Regular Expressions' box, and enter something like:
[\n] (to search for line break). Have also tried:
[\r]
[\f]

and so forth, but no line breaks are detected in the target (html) text which obviously contains line breaks, carriage returns etc.

Any suggestions as to what could be wrong greatly appreciated. Ultimately I would like to replace
'<br> ---- line break ---- <br>'
with:
'</p><p align="left">'
 
Old 01-24-2005, 01:04 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Re: Regular Expressions in Quanta Web Editor

Quote:
Originally posted by Mr T Donegal
[\n] (to search for line break). Have also tried:
[\r]
[\f]
I'm not using quanta, but in any other regex that
would search for a single character, either a \ or
a r(n,t) ... remove the brackets?


Cheers,
Tink
 
Old 04-29-2010, 09:07 AM   #3
Mr T Donegal
Member
 
Registered: Feb 2004
Location: Netherlands
Distribution: Suse 9.3
Posts: 31

Original Poster
Rep: Reputation: 15
Quanta Regular Expressions

Hi - I had a similar scenario. It took me a while to figure it out.

I copied a bunch of code (from Drupal CMS editor - so all html concatenated/without linebreaks)

I wanted to re-edit the code in Quanta, and to, for example, make line breaks before each HTML bullet point to make editing easier.

<li>one<li>two<li>three
to:
<li>one
<li>two
<li>>three


Method :Copy and paste into Quanta
Place cursor at the start of the code.

Click Ctrl - R for Find and Replace
Text to find: <li>
Regular Expression - yes
Replacement text \n<li>
Use placeholders - yes
Options: From cursor

The problem I had at first was that the cursor, after pasting, was at the end of the text. After finding nothing, you're asked 'Continue from beginning' (yes) - but the Regular Expression does not work. Must be a bug. I hope this helps someone out.

(Quanta 3.5.10 on (k)ubuntu 10.4)
 
Old 04-29-2010, 09:20 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Hmmm---since you are the OP, are you saying you solved your own problem after almost 5 1/2 years?

Now THAT is perserverance!!!
 
Old 08-16-2010, 09:23 AM   #5
Mr T Donegal
Member
 
Registered: Feb 2004
Location: Netherlands
Distribution: Suse 9.3
Posts: 31

Original Poster
Rep: Reputation: 15
Yes - Came across the solution after 5 years - or the program changed - I don't know which. I now have a new problem. I am trying to copy text from a PDF file (produced via windows/word and viewed through Okular) into a CMS (Drupal). I want to remove the line-breaks from the text. Find and replace with \n and \r does not seem to work here. Any solutions?
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Regular Expressions markjuggles Programming 2 05-05-2005 11:39 AM
Regular Expressions overbored Linux - Software 3 06-24-2004 02:34 PM
help with REGULAR EXPRESSIONS ner Linux - General 23 10-31-2003 11:09 PM
Regular expressions aromes Linux - General 1 10-15-2003 12:29 PM
regular expressions? alaios Linux - General 2 06-11-2003 03:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:02 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
Open Source Consulting | Domain Registration