LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] regexp / php question

[ILUG] regexp / php question

Brian Foster blf at blf.utvinternet.ie
Wed Aug 17 21:23:34 IST 2005


  | Date: Wed, 17 Aug 2005 14:37:37 +0100
  | From: "John P. Looney" <valen at tuatha.org>
  | 
  |  This is a trick7y one, that slightly hurts my head. I'm wondering
  | is there an easy way that I don't know of, to solve this:
  | 
  |  I have a text file, with zero or more patterns like:
  | 
  |  send an email to 'Looney' <email at domain.com> and tell him about it.
  | 
  |  I'd like to replace 'Looney' with <a href="thing?Looney"> and
  | email at domain.com with a href="mailto:email at domain.com".

 which would produce:

     send an email to <a href="thing?Looney"> <a href="mailto:email at domain.com"> and tell him about it.

 assuming that is supposed to be legal HTML, it is not.
 where do the </a>s go?

 also, what <a href=...> text is inside the anchor </a>?

 finally, is the “thing?” part of the 1st href the same
 for all Looney's?   (I understand each line may have a
 different Looney and email at domain.com, correct?)

 it _looks_ like a job for sed(1), probably a 1-liner, as
 soon as we understand what it is that is to be produced.

cheers!
	-blf-
-- 
Experienced (20+ yrs) kernel/software Eng: | Brian Foster   Montpellier,
 • Unix, embedded, &tc;  • Linux;  • doc;  | blf at utvinternet.ie   FRANCE
 • IDL, automated testing, process, &tc.   |  Stop E$$o (ExxonMobile)!
Résumé (CV) http://www.blf.utvinternet.ie  |     http://www.stopesso.com



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell