OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
RE: Selecting a column with a regular expression applied to it?

From: Jerry Schwartz (jschwartzthe-infoshop.com)
Date: Thu Sep 11 2008 - 09:31:39 CDT


>-----Original Message-----
>From: Darryle Steplight [mailto:dsteplightgmail.com]
>Sent: Thursday, September 11, 2008 10:00 AM
>To: Ryan Stille
>Cc: mysqllists.mysql.com
>Subject: Re: Selecting a column with a regular expression applied to it?
>
>Hi Ryan,
>
>MySql does have regular expressions. See Link
>http://dev.mysql.com/doc/refman/5.0/en/regexp.html
>
[JS] But I think regular expressions can only be used as a true/false match
test, not for manipulating data. You can use the REPLACE() function.

>On Thu, Sep 11, 2008 at 9:52 AM, Ryan Stille <ryancfwebtools.com>
>wrote:
>> From looking at the MySQL 5 docs, it doesn't look like there is any
>way to
>> select a column with a regular expression applied to it?
>>
>> I have a column that has ended up with some non ascii characters in
>it,
>> probably vertical tabs and things like that from MS Excel. I need to
>sort
>> by this field but its not coming out right because some of the values
>have
>> these bad characters at the beginning. I'd like to select that
>column with
>> a regex applied to it that strips out all the non-ascii chars, then
>sort by
>> that field. Is this possible?
>>
>> All the examples I saw are just using the regex in the where clause.
>>
>> Thanks,
>> -Ryan
>>
>>
>> --
>> MySQL General Mailing List
>> For list archives: http://lists.mysql.com/mysql
>> To unsubscribe:
>http://lists.mysql.com/mysql?unsub=dsteplightgmail.com
>>
>>
>
>--
>MySQL General Mailing List
>For list archives: http://lists.mysql.com/mysql
>To unsubscribe: http://lists.mysql.com/mysql?unsub=jschwartzthe-
>infoshop.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql