unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: help-gnu-emacs@gnu.org
Subject: Re: How to get title of web page by url?
Date: Wed, 28 Jul 2010 09:49:22 -0500	[thread overview]
Message-ID: <8762zzu0el.fsf@lifelogs.com> (raw)
In-Reply-To: mailman.2.1280326418.17798.help-gnu-emacs@gnu.org

On Wed, 28 Jul 2010 16:12:52 +0200 Deniz Dogan <deniz.a.m.dogan@gmail.com> wrote: 

DD> 2010/7/28 Thamer Mahmoud <thamer.mahmoud@gmail.com>:
>>    (re-search-forward "<title>\\(.*\\)<[/]title>" nil t 1)

DD> Why [/] and not /?

DD> By the way, this will not work in scenarios where the title is spread
DD> out across multiple lines:

DD> <title>
DD>   Hello
DD> </title>

DD> How would you solve this in Emacs Lisp?

It will break in many other situations.  For example, it doesn't check
that the <title> tag is inside the <head> tag or remove comments.  It's
hard to parse HTML properly.

Ted


      parent reply	other threads:[~2010-07-28 14:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-27 12:14 How to get title of web page by url? filebat Mark
2010-07-28  5:08 ` Thamer Mahmoud
2010-07-28 13:44   ` filebat Mark
2010-07-28 15:34     ` Thamer Mahmoud
2010-07-28 15:44       ` Lennart Borgman
2010-07-28 18:14       ` Thamer Mahmoud
2010-07-29 15:07         ` filebat Mark
2010-07-28 14:12   ` Deniz Dogan
2010-07-28 14:53     ` Teemu Likonen
2010-07-28 16:03       ` Andreas Röhler
2010-07-28 19:52         ` Andreas Röhler
     [not found]   ` <mailman.2.1280326418.17798.help-gnu-emacs@gnu.org>
2010-07-28 14:49     ` Ted Zlatanov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8762zzu0el.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).