RE: Regular expresion replace possibility?
From the manual: REPLACE(str,from_str,to_str) Returns the string str with all occurrences of the string from_str replaced by the string to_str: mysql SELECT REPLACE('www.mysql.com', 'w', 'Ww'); - 'WwWwWw.mysql.com' This function is multi-byte safe. Terry Spencer Haigh Consultancy Services +44 (0)2073007329 www.haigh-cs.co.uk -Original Message- From: Dean Householder [mailto:[EMAIL PROTECTED] Sent: Monday, July 21, 2003 9:49 PM To: [EMAIL PROTECTED] Subject: Regular expresion replace possibility? Is it possible to run a query that will just alter text possibly using a regular expression? I have about 250 rows that I want to strip quotes out of. Does anyone know of an easy way to do this? Dean -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Regular expresion replace possibility?
UPDATE mytable SET mytext = REPLACE(mytext,'',''); Assuming you wised to strip a double quote, modify to suit. Regards, Mike Hillyer www.vbmysql.com -Original Message- From: Dean Householder [mailto:[EMAIL PROTECTED] Sent: Monday, July 21, 2003 2:49 PM To: [EMAIL PROTECTED] Subject: Regular expresion replace possibility? Is it possible to run a query that will just alter text possibly using a regular expression? I have about 250 rows that I want to strip quotes out of. Does anyone know of an easy way to do this? Dean -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Regular expresion replace possibility?
Worked like a charm! I couldn't find anything about this in MySQL docs though... Neither before I knew what to search for nor after. What's up with that? Dean - Original Message - From: Mike Hillyer [EMAIL PROTECTED] To: Dean Householder [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, July 21, 2003 1:53 PM Subject: RE: Regular expresion replace possibility? UPDATE mytable SET mytext = REPLACE(mytext,'',''); Assuming you wised to strip a double quote, modify to suit. Regards, Mike Hillyer www.vbmysql.com -Original Message- From: Dean Householder [mailto:[EMAIL PROTECTED] Sent: Monday, July 21, 2003 2:49 PM To: [EMAIL PROTECTED] Subject: Regular expresion replace possibility? Is it possible to run a query that will just alter text possibly using a regular expression? I have about 250 rows that I want to strip quotes out of. Does anyone know of an easy way to do this? Dean -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Regular expresion replace possibility?
You have to search for 'string functions' to find it. Problem is that a search for REPLACE will bring up the REPLACE syntax, not the REPLACE() syntax (not the brackets ;-) ) Regards, Mike Hillyer www.vbmysql.com -Original Message- From: Dean Householder [mailto:[EMAIL PROTECTED] Sent: Monday, July 21, 2003 3:39 PM To: Mike Hillyer; [EMAIL PROTECTED] Subject: Re: Regular expresion replace possibility? Worked like a charm! I couldn't find anything about this in MySQL docs though... Neither before I knew what to search for nor after. What's up with that? Dean - Original Message - From: Mike Hillyer [EMAIL PROTECTED] To: Dean Householder [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, July 21, 2003 1:53 PM Subject: RE: Regular expresion replace possibility? UPDATE mytable SET mytext = REPLACE(mytext,'',''); Assuming you wised to strip a double quote, modify to suit. Regards, Mike Hillyer www.vbmysql.com -Original Message- From: Dean Householder [mailto:[EMAIL PROTECTED] Sent: Monday, July 21, 2003 2:49 PM To: [EMAIL PROTECTED] Subject: Regular expresion replace possibility? Is it possible to run a query that will just alter text possibly using a regular expression? I have about 250 rows that I want to strip quotes out of. Does anyone know of an easy way to do this? Dean -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Regular expresion replace possibility?
Worked like a charm! I couldn't find anything about this in MySQL docs You have to search for 'string functions' to find it. Problem is that a search for REPLACE will bring up the REPLACE syntax, not the REPLACE() Or you can look at the function index http://www.mysql.com/doc/en/Function_Index.html It lists all the functions, so whatever function you are looking for, it is usually there. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]