On Tue, Jan 7, 2014 at 12:33 PM, Michael Dykman wrote:
> I think you just have a misplaced parenthesis. try:
> SELECT IF(r REGEXP '^ED[HMUZ][0-9]$', 'yes', 'no') FROM s;
Yes, thanks!
>
>
>
> On Tue, Jan 7, 2014 at 2:22 PM, Larry Martell wrote:
>
>> Can I use an regexp in a conditional?
On Tue, Jan 7, 2014 at 12:31 PM, Peter Brawley
wrote:
>
> On 2014-01-07 1:22 PM, Larry Martell wrote:
>>
>> Can I use an regexp in a conditional? I need to do something like this:
>>
>> SELECT (IF r REGEXP '^ED[HMUZ][0-9]$', 'yes', 'no') FROM s;
>>
>> I'm getting an error from that. Is there some
I think you just have a misplaced parenthesis. try:
SELECT IF(r REGEXP '^ED[HMUZ][0-9]$', 'yes', 'no') FROM s;
On Tue, Jan 7, 2014 at 2:22 PM, Larry Martell wrote:
> Can I use an regexp in a conditional? I need to do something like this:
>
> SELECT (IF r REGEXP '^ED[HMUZ][0-9]$', 'yes
On 2014-01-07 1:22 PM, Larry Martell wrote:
Can I use an regexp in a conditional? I need to do something like this:
SELECT (IF r REGEXP '^ED[HMUZ][0-9]$', 'yes', 'no') FROM s;
I'm getting an error from that. Is there some way to do this?
SELECT IF( r REGEXP '^ED[HMUZ][0-9]$', 'yes', 'no' )
F
On 1/21/10 10:27 AM, "John Campbell" wrote:
> I want to find rows that contain a word that matches a term, accent
> insensitive: I am using utf8-general collation everywhere.
>
> attempt 1:
> SELECT * FROM t WHERE txt LIKE '%que%'
> Matches que qué, but also matches 'queue'
>
> attempt 1.5:
>
On Jan 21, 2010, at 9:27 AM, John Campbell wrote:
> I want to find rows that contain a word that matches a term, accent
> insensitive: I am using utf8-general collation everywhere.
>
> attempt 1:
> SELECT * FROM t WHERE txt LIKE '%que%'
> Matches que qué, but also matches 'queue'
>
> attempt 1
On Wednesday 03 December 2008 08:39:54 Paul Nowosielski wrote:
> Hi,
>
> Please, can anyone lend a hand in helping pullout
> phone numbers from the DB that only match
> the format (nnn) nnn- ?
"("[0-9]{3}") "[0-9]{3}-[0-9]{4}
I think
HTH
W
> SELECT phone_work FROM leads WHERE phone_work REGEX
This seems to do it:
SELECT phone_work FROM leads WHERE phone_work REGEXP '[(]{1}([0-9]){3}[)]{1}[
]?([^0-1]){1}([0-9]){2}[ ]?[-]?[ ]?([0-9]){4}'
- Original Message
From: Paul Nowosielski <[EMAIL PROTECTED]>
To: mysql@lists.mysql.com
Sent: Wednesday, December 3, 2008 2:39:54 PM
Subjec
It looks like "LIKE" is only slightly faster(on my XP), hardly worth
mentioning. Go with what is easier for you to read or for portability if
you need it. IMHO
set @a='gfdueruie baz hdhrh';select BENCHMARK(500, (select 1 from
dual WHERE @a LIKE '%foo%' OR @a LIKE '%bar%' OR @a LIKE '%baz%')) a
MySQL's regex library doesn't have all those Perl features. You can use
the pcre-compatible extension from http://www.xcdsql.org/MySQL/UDF/, or
just use two clauses in the WHERE: one should be
col NOT RLIKE "linux$"
Baron
Tang, Jasmine wrote:
Hi,
I need to match anything that start with "
At 5:33 AM -0400 5/2/07, John Kebbel wrote:
I went to the MySQL documentation pages and read up on using COLLATE. I
knew SELECT was case-insensitive, but I was sort of surprised that using
a character class didn't override that. Anyway, I next tried the
"status" command to see if it gave me any c
to
> [EMAIL PROTECTED]
>
>
>
>
> To
> MySQL
>
>cc
>
> Subject
> Re: REGEXP
> Character Classes
>
>
>
>
>
>
>
>
> I went to the MySQL documentation pages and read up on using COLLATE.
> I
>
I went to the MySQL documentation pages and read up on using COLLATE. I
knew SELECT was case-insensitive, but I was sort of surprised that using
a character class didn't override that. Anyway, I next tried the
"status" command to see if it gave me any characterset information.
Client characterset:
At 6:20 PM -0400 5/1/07, John Kebbel wrote:
Linux Version: Linux version 2.6.15-28-386
MySQL Version: 5.0.22-Debian_0ubuntu6.06.3-log
I have two queries using REGEXP character classes and their respective
outputs below. The first is supposed to match an upper case character in
a column, but I w
From: "Paul Groves"
> The main con for me is that it won't index words of three characters
> (which I think I will in my queries) or less unless I change the default
> server setting (can you do this on a by database basis?), which may be
> possible, but it depends where its finally hosted...
You
Jigal van Hemert wrote:
From: "Paul Groves"
BTW is there anyway to speed up the search, as I think this may be
pretty slow (there will be about 25000 records in the real database...)
e.g. maybe by doing a LIKE match for "%elbow%" first then doing a REGEXP
within that? Not sure how one would code th
t; <[EMAIL PROTECTED]>
To: "Jigal van Hemert" <[EMAIL PROTECTED]>
Cc: "Paul Groves" <[EMAIL PROTECTED]>;
Sent: Thursday, March 24, 2005 5:47 PM
Subject: Re: REGEXP word boundary problem
> Jigal van Hemert wrote:
> > From: "Paul Groves"
From: "Paul Groves"
> BTW is there anyway to speed up the search, as I think this may be
> pretty slow (there will be about 25000 records in the real database...)
> e.g. maybe by doing a LIKE match for "%elbow%" first then doing a REGEXP
> within that? Not sure how one would code the SQL for that,
Paul Groves wrote:
Jigal van Hemert wrote:
From: "Paul Groves"
SELECT * FROM object WHERE description REGEXP '[[:<:]]elbow[[:>:]]';
There are records in the object table that have the following
description fields (as test data):
elbows ligaments
elbowed ligaments
My elbow
elbow joint
Whose elbow is
Jigal van Hemert wrote:
From: "Paul Groves"
SELECT * FROM object WHERE description REGEXP '[[:<:]]elbow[[:>:]]';
There are records in the object table that have the following
description fields (as test data):
elbows ligaments
elbowed ligaments
My elbow
elbow joint
Whose elbow is that
The query sho
From: "Paul Groves"
> SELECT * FROM object WHERE description REGEXP '[[:<:]]elbow[[:>:]]';
>
> There are records in the object table that have the following
> description fields (as test data):
>
> elbows ligaments
> elbowed ligaments
> My elbow
> elbow joint
> Whose elbow is that
>
> The query sho
Paul DuBois wrote:
Why do you think this? That's not what the regex chapter in the MySQL
manual says. \b works in Perl, but MySQL isn't Perl.
I looked through the pattern matching section and didn't see what you
linked below.
The easiest way to find out the correct syntax is to look in the MySQ
At 19:14 -0400 6/27/04, Luke Majewski wrote:
Hi All,
I have fields like:
"Washable Velour Doll"
in my database and I want to do a boundary match so that when people
enter a search field like "Velour" I return all instances where the
whole word exists. In other words, 'lour' would not work. I kn
Hi!
On Apr 07, Hirofumi Fujiwara wrote:
>
> From: Sergei Golubchik <[EMAIL PROTECTED]>
> > Hi!
> >
> > On Apr 06, Hirofumi Fujiwara wrote:
> > >
> > > I am testing regular expression feature of MYSQL 4.1.1-alpha
> > > (REGEXP) with UTF-8 characters (Japanese). So far it doesn't
> > > seem to w
From: Sergei Golubchik <[EMAIL PROTECTED]>
> Hi!
>
> On Apr 06, Hirofumi Fujiwara wrote:
> >
> > I am testing regular expression feature of MYSQL 4.1.1-alpha
> > (REGEXP) with UTF-8 characters (Japanese). So far it doesn't
> > seem to work.
> >
> > LIKE handles each Japanese character properly
Hi!
On Apr 06, Hirofumi Fujiwara wrote:
>
> I am testing regular expression feature of MYSQL 4.1.1-alpha
> (REGEXP) with UTF-8 characters (Japanese). So far it doesn't
> seem to work.
>
> LIKE handles each Japanese character properly as one character,
> but REGEXP doesn't.
>
> I'd like to know
<[EMAIL PROTECTED]>, <[EMAIL
PROTECTED]>
ve.com> cc:
Subject: RE: RegExp Help
> >you should be able to use STR_REPLACE.
> DOH. Sorry, there is NO STR_REPLACE its just REPLACE.
> jd
>
> >update 02093_xdir_links SET title = REPLACE("*","",title);
Thank you very much for responding. Sorry to be dense but will this SQL
find only those records with data in the TIT
>you should be able to use STR_REPLACE.
DOH. Sorry, there is NO STR_REPLACE its just REPLACE.
jd
>update 02093_xdir_links SET title = REPLACE("*","",title);
>hth
>jeff
"Bob Cohen"
<[EMAIL PROTECTED]To:
<[
you should be able to use STR_REPLACE.
update 02093_xdir_links SET title = REPLACE("*","",title);
hth
jeff
"Bob Cohen"
atleast: d-dd-d
0-00-0
9-99-0
select count(*) from processes where
`in` regexp "[0-9]{1}-[0-9]{2}-[0-9]{1
}";
for:
00-00-0
99-99-0
select count(*) from processes where
`in` regexp "[[:space:]][0-9]{2}-[0-9]
{2}-[0-9]{1}";
for
00-00-0,
99-99-0,
select count(*) from processes where
because '-' is understood as "from" - "to" e.g a-z, 0-9, etc.,
Escape the '-' with a backslash: '\-'
JP
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Richard --
...and then Richard Baskett said...
%
% Ok finally found the answer after many hours of searching :) Here is the
% MySQL query that works great!
%
% SELECT * FROM table_name
% WHERE Email NOT
% REGEXP "^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z
ssage-
From: Robert Citek [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 5:44 PM
To: MySQL
Subject: Re: REGEXP email address query
Hello Richard,
At 05:06 PM 12/10/2002 -0800, Richard Baskett wrote:
>SELECT * FROM `table_name` WHERE Email REGEXP "^[@]";
>But I am doin
Ok finally found the answer after many hours of searching :) Here is the
MySQL query that works great!
SELECT * FROM table_name
WHERE Email NOT
REGEXP "^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,3}"
Thanks to all that replied!
Rick
"Keep away from people who belittle your a
Hello Richard,
At 05:06 PM 12/10/2002 -0800, Richard Baskett wrote:
>SELECT * FROM `table_name` WHERE Email REGEXP "^[@]";
>But I am doing something wrong, because it's just not working :)
You are searching for an Email field that begins with an @.
Some alternatives:
SELECT * FROM `table_name
At 18:35 +0200 10/12/02, tl wrote:
>Hello,
>
>mysql>LOAD DATA LOCAL INFILE 'access.log' INTO TABLE tmp FIELDS
>TERMINATED BY 'REGEXP \"^[ ]{1,}$\"' OPTIONALLY ENCLOSED BY ''
>ESCAPED BY ' ' LINES TERMINATED BY '\n' ;
>
>How can I make that it would work as I expected?
>How terminate fields by s
At 16:04 -0400 10/10/02, Kevin wrote:
>Another question...I know. Second one in 24 hours...I hate it too.
>
>I have a column of data that may begin with an open parenthesis "(". When I
>do this:
>
> mysql> SELECT * FROM table WHERE column REGEXP "^(text";
>
>I get this:
>
> ERROR 1139: Got
On Mon, Mar 04, 2002 at 02:42:46PM -0800, destr0 wrote:
> filter fodder: mysql, database, sql
>
> whigh one is faster?
>
> REGEXP or LIKE?
LIKE is generally faster. But LIKE can't do everything that REGEXP
can, so that's probably no surprise.
Jeremy
--
Jeremy D. Zawodny, <[EMAIL PROTECTED]>
Hi,
On Tue, 2002-03-05 at 08:42, destr0 wrote:
> whigh one is faster?
> REGEXP or LIKE?
LIKE is an SQL language construct, REGEXP is a function.
LIKE only uses two simple wildcards (_ and *). Provided your LIKE
pattern does not start with a wildcard, the server will be able to use
an index for i
The following is the piece describing LIKE and INDEX from the manual. The real
question is does REGEXP use indexes.
Using explain shows that it actually does, probably with the same rules as LIKE!!!
Thanks for your help.
MySQL also uses indexes for LIKE comparisons if the argument to LIKE is
At 18:07 -0800 2/10/02, Jeremy Zawodny wrote:
>On Sun, Feb 10, 2002 at 02:53:53PM -0500, Matthew Dougherty wrote:
>> If I use a REGEXP query on an indexed column using something like:
>> Field REGEXP '^A|^B|^C'
>>
>> Will MySQL use the index like it would if I used Field LIKE 'A%' or
>> Field
On Sun, Feb 10, 2002 at 02:53:53PM -0500, Matthew Dougherty wrote:
> If I use a REGEXP query on an indexed column using something like:
> Field REGEXP '^A|^B|^C'
>
> Will MySQL use the index like it would if I used Field LIKE 'A%' or
> Field LIKE 'B%' or FIeld LIKE 'C%' ??
It will not.
Regular
On Sun, Feb 10, 2002 at 10:01:45PM -0600, Paul DuBois wrote:
> At 18:07 -0800 2/10/02, Jeremy Zawodny wrote:
> >On Sun, Feb 10, 2002 at 02:53:53PM -0500, Matthew Dougherty wrote:
> >> If I use a REGEXP query on an indexed column using something like:
> >> Field REGEXP '^A|^B|^C'
> >>
> >> Will
At 21:30 -0800 2/10/02, Jeremy Zawodny wrote:
>On Sun, Feb 10, 2002 at 10:01:45PM -0600, Paul DuBois wrote:
>> At 18:07 -0800 2/10/02, Jeremy Zawodny wrote:
>> >On Sun, Feb 10, 2002 at 02:53:53PM -0500, Matthew Dougherty wrote:
>> >> If I use a REGEXP query on an indexed column using something
At 21:30 -0800 2/10/02, Jeremy Zawodny wrote:
>On Sun, Feb 10, 2002 at 10:01:45PM -0600, Paul DuBois wrote:
>> At 18:07 -0800 2/10/02, Jeremy Zawodny wrote:
>> >On Sun, Feb 10, 2002 at 02:53:53PM -0500, Matthew Dougherty wrote:
>> >> If I use a REGEXP query on an indexed column using something
On Sun, Feb 10, 2002 at 10:01:45PM -0600, Paul DuBois wrote:
> At 18:07 -0800 2/10/02, Jeremy Zawodny wrote:
> >On Sun, Feb 10, 2002 at 02:53:53PM -0500, Matthew Dougherty wrote:
> >> If I use a REGEXP query on an indexed column using something like:
> >> Field REGEXP '^A|^B|^C'
> >>
> >> Will
At 18:07 -0800 2/10/02, Jeremy Zawodny wrote:
>On Sun, Feb 10, 2002 at 02:53:53PM -0500, Matthew Dougherty wrote:
>> If I use a REGEXP query on an indexed column using something like:
>> Field REGEXP '^A|^B|^C'
>>
>> Will MySQL use the index like it would if I used Field LIKE 'A%' or
>> Field
On Sun, Feb 10, 2002 at 02:53:53PM -0500, Matthew Dougherty wrote:
> If I use a REGEXP query on an indexed column using something like:
> Field REGEXP '^A|^B|^C'
>
> Will MySQL use the index like it would if I used Field LIKE 'A%' or
> Field LIKE 'B%' or FIeld LIKE 'C%' ??
It will not.
Regular
; "Beginners
(E-mail)" <[EMAIL PROTECTED]>
Cc: "*MySQL mail list" <[EMAIL PROTECTED]>
Sent: Sunday, January 13, 2002 11:36 AM
Subject: RE: Regexp Help !!!
>
> Thanks !
>
> Glad I asked for some other thoughts on this. I totally over looked this
>
To: Jon Shoberg; Beginners (E-mail)
Cc: *MySQL mail list
Subject: RE: Regexp Help !!!
> -Original Message-
> From: Jon Shoberg [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, January 13, 2002 4:47 PM
> To: Beginners (E-mail)
> Cc: *MySQL mail list; Jon Shoberg
> Su
> -Original Message-
> From: Jon Shoberg [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, January 13, 2002 4:47 PM
> To: Beginners (E-mail)
> Cc: *MySQL mail list; Jon Shoberg
> Subject: Regexp Help !!!
>
>
> Ok,
>
> I have a list/database of words that follows as ...
>
> Top
> ...
> Top/A
Nate Fowler writes:
> Okay, I'm trying to make a form talk to a SELECT query using PHP. How do I
> make input from a form become a PHP variable?
This is explained in great detail in the PHP manual at
http://www.php.net
> ">
> name="Submit" value="GO">
This looks
Mark:
the key to this puzzle is the separator, the ';'
for your first question, you need to find the ';' followed by a 6. not just
any ';', but the first ';'
the pattern would be "^[0-9]*;6"
which says
^ find beginning of line
[0-9]* followed by zero or more instance
On Thu, Mar 15, 2001 at 08:50:01AM -0800, Mike DeWolfe wrote:
> I'm having a problem with REGEXP :
>
> I have several rows that look like this :
>
> Health : health services : safety : physical abuse : women
> Health : health services : safety : rescue
> Health : health services : safety : sexua
55 matches
Mail list logo