From: hsv Date: October 13 2012 12:51pm Subject: Re: Extract text from string List-Archive: http://lists.mysql.com/mysql/228388 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" >>>> 2012/10/12 17:56 +0100, Neil Tompkins >>>> Is there such a way in a MySQL query to extract the text "this is a test" from the following strings as a example this is a test link <<<<<<<< Amongst the built-in functions there isn't much; for the former example, if the string is "s", this works: SUBSTRING_INDEX(SUBSTRING_INDEX(s, '>', -3), '<', 1) ; for the latter, if "t": SUBSTRING_INDEX(SUBSTRING_INDEX(t, '"', -4), '"', 1) . If you want a real HTML parser that discards everything but arbitrary strings, you have to get & install your own.