Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2004
    Location
    Mars
    Posts
    137

    Thumbs up Unanswered: Parse text inside a longtext column

    Hi

    I have a table with the following structure

    Post longtext
    title varchar(200)

    and other columns…

    In the post column I have text which is HTML format.

    Now I want to grab the title of each post which is present inside the <title> …</title>tag and insert it into the title column.

    I have been trying lot of string functions but couldn’t accomplish it. Can any offer me some suggestion?
    Sudar

    --
    My Blog

  2. #2
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    161
    RegExp returns 0 or 1 - there doesnt seem to be any option to return the matches.

    So you'll have to actually do this using some scripting language.
    MySQL 5.1

  3. #3
    Join Date
    Jul 2004
    Location
    Mars
    Posts
    137
    Hi Anjanesh,

    Thanks for the reply.

    Even I was thinking that this will not be possible using MySQL alone and thanks for confirming it. I will try to do it using PHP.
    Sudar

    --
    My Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •