From: Hank Date: March 9 2012 2:55am Subject: Re: preg_replace in update statement List-Archive: http://lists.mysql.com/mysql/226945 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable They are regular words. I was hoping someone would already know how to do it. I was trying to avoid rolling my own solution using the string functions. It gets really messy, really quick. -Hank On Thu, Mar 8, 2012 at 8:18 PM, Michael Dykman wrote: > If your words need to be regular expressions, per-se with meta > characters, etc.. =A0you are pretty much out of luck. =A0If you only need > to match some literal strings, a method can surely be derived through > the heavy-handed use of mysql's string function library. > > http://dev.mysql.com/doc/refman/5.0/en/string-functions.html > > =A0- michael dykman > > On Thu, Mar 8, 2012 at 4:11 PM, Hank wrote: >> I have a simple problem: >> >> I have a varchar field in the database, and I want to remove all text >> between WordA and WordB, including WordA and WordB, leaving all text >> before WordA and after WordB intact. >> >> Possible with just SQL? =A0I know I can write a PHP program to do it, >> but it's not that important to spend that much time on. =A0I'd like one >> SQL statement to do it. >> >> Thanks! >> >> -Hank >> >> -- >> MySQL General Mailing List >> For list archives: http://lists.mysql.com/mysql >> To unsubscribe: =A0 =A0http://lists.mysql.com/mysql >> > > > > -- > =A0- michael dykman > =A0- mdykman@stripped > > =A0May the Source be with you.