> From: Olivier Nicole
>
> You could look for a tool called "The Regex Coach". While it is mainly
> for Windows, it runs very well in vine. I fijd it highly useful to debug
> regexps.
On the Mac, look for "RegExRx." It lets you paste in text to work on, build a
regex, and see the result in real
I don't think it accepts \d, or much of anything else I am used to
putting in expressions :)
This is what I ended up with and it appears to be working:
REGEXP '10.[[:alnum:]]{1,3}.(22[4-9]|23[0-9]).[[:alnum:]]{1,3}'
On Thu, Mar 19, 2015 at 11:10 AM, Michael Dykman wrote:
>
close:
10[.]\d{1,3}[.](224|225|226|227|228|229|23\d))[.]\d{1.3}
On Thu, Mar 19, 2015 at 9:39 AM, Paul Halliday
wrote:
> I am trying to pick out a range of IP addresses using REGEXP but
> failing miserably :)
>
> The pattern I want to match is:
>
> 10.%.224-239.%.%
>
>
Paul,
You could look for a tool called "The Regex Coach". While it is mainly
for Windows, it runs very well in vine. I fijd it highly useful to debug
regexps.
Best regards,
Olivier
--
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists
I am trying to pick out a range of IP addresses using REGEXP but
failing miserably :)
The pattern I want to match is:
10.%.224-239.%.%
The regex I have looks like this:
AND INET_NTOA(src_ip) REGEXP '\d{1,3}\\.\d{1,3}\.(22[4-9]|23[0-9])\\.\d{1,3}'
but, go fish. Thoughts?
Thanks!
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
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')
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:
>
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 R
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?
--
MySQL General Mailing List
For list archives: http://l
> value within the square brackets.
> >
> > I could write something in perl or php to run through each and update
> them
> > but was wondering if there is a way to do this within mysql itself? The
> > regexp only returns a boolean so I can't see how to use that.
perl or php to run through each and update them
> but was wondering if there is a way to do this within mysql itself? The
> regexp only returns a boolean so I can't see how to use that.
>
> Regards
>
> Phil
>
>
> --
> Distributed Computing stat
ackets.
I could write something in perl or php to run through each and update them
but was wondering if there is a way to do this within mysql itself? The
regexp only returns a boolean so I can't see how to use that.
Regards
Phil
--
Distributed Computing stats
http://stats.free-dc.org
Is this what you meant?
SELECT * FROM tbl where Fname REGEXP '^[abcd]' AND Lname REGEXP '^[abcd]'
(alternatively, the extression could be simpliefied as "REGEXP '^[a-d]" )
- md
On Fri, Oct 22, 2010 at 11:01 AM, bharani kumar
wrote:
> in my database,
&
in my database,
if i want to render firstname and lastname match case ,
am using REGEXP '^[abcd]' WORK FOR SINGLE FIELD,
Now i have fname and lastname ,
How to make the query , which display both and single field satisfieds
records ,
That is my query should return like
Nam
You regular expression is alittle off. You don't need the OR operator
'|' inside the character class definition, it is implied. Try this:
[php]
SELECT * FROM tbl where Fname REGEXP '^[abcd]'
[/php]
- michael dykman
On Thu, Oct 21, 2010 at 11:07 PM, bharani kumar
starting
with A , B, C, D names should be pull out ,
For that i just used this REGEXP QUERY ,
[php]
SELECT * FROM tbl where Fname REGEXP '^[a]'
[/php]
This works fine, only rendering the starting with "a" Names ,
But if i add the or condition in that
[php]
SELECT * FROM tbl where
Hi List,
I'm using regular expressions on a simple table.
I was wondering how large a regular expression is allowed to be? Are
there any limitations and if so which ones?
Thanks,
Jelle S.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
also matches 'queue'
>
> attempt 1.5:
> SELECT * FROM t WHERE txt LIKE '% que %' OR LIKE 'que %' OR LIKE '% que';
> Almost, but misses "que!" or 'que...'
>
> attempt2:
> SELECT * FROM t WHERE txt REGEXP '[[:&
matches 'queue'
>
> attempt 1.5:
> SELECT * FROM t WHERE txt LIKE '% que %' OR LIKE 'que %' OR LIKE '% que';
> Almost, but misses "que!" or 'que...'
>
> attempt2:
> SELECT * FROM t WHERE txt REGEXP '[[
que %' OR LIKE 'que %' OR LIKE '% que';
Almost, but misses "que!" or 'que...'
attempt2:
SELECT * FROM t WHERE txt REGEXP '[[:<:]]que[[:>:]]'
Matches que, not queue, but doesn't match qué.
attempt3
SELECT * FROM t WHERE txt REGEXP
Hi
How can I specify 'unprintable' characters is a MySQL regexp ?
Query is (example only):
SELECT something FROM table WHERE column REGEXP 'Ã\\xA0';
I'm looking for an equivalent of the search part of a sed expression like
this:
s/Ã\xA0/à/g
which means I want to
phone_work FROM leads WHERE phone_work REGEXP 'the_expression?'
>
> I've been trying to lick this for hours now with
> no avail.
>
> Thank you,
>
> Paul
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
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,
Hi,
Please, can anyone lend a hand in helping pullout
phone numbers from the DB that only match
the format (nnn) nnn- ?
SELECT phone_work FROM leads WHERE phone_work REGEXP 'the_expression?'
I've been trying to lick this for hours now with
no avail.
Thank you,
Paul
How can I use REGEXP case insensitive SQL QUERY
Ex: select * from table where a REGEXP 'abc' will match both 'abc' and 'ABC'
LIKE '%bar%' OR @a LIKE '%baz%')) as
elapse_time;
# average 750ms
set @a='gfdueruie baz hdhrh';select BENCHMARK(500, (select 1 from
dual WHERE @a REGEXP 'foo|bar|baz' != 0)) as elapse_time;
# average 770ms
Ed
-Original Message-
From: Morten Pri
Hi,
I want to retrieve all records where the field "value" contains either
"foo", "bar" or "baz". Like so:
SELECT id FROM table WHERE value LIKE '%foo%' OR value LIKE '%bar%' OR
value LIKE '%baz%';
But then I stu
On Dec 10, 2007 1:26 AM, David Scott <[EMAIL PROTECTED]> wrote:
> I came up with a clunky solution: REGEXP
> 'lvlscore5:[6-9][0-9][0-9][0-9][0-9]';
> This gives me all scores over 6000. I then add on another [0-9] and change
> the [6-9] to [1-9] to do 10k+
> As this
I came up with a clunky solution: REGEXP
'lvlscore5:[6-9][0-9][0-9][0-9][0-9]';
This gives me all scores over 6000. I then add on another [0-9] and change
the [6-9] to [1-9] to do 10k+
As this was a one off and only returned 6 out of thoustands of records it
was good enough for a quick
o select all records where the "lvlscore5:" is greater than 3000.
> > I think this can be done using REGEXP but I have read the docs and am non
> > the wiser for it. Can anyone point me in the right direction?
> > --
> > Thanks
> > David Scott
> >
> In
On Dec 9, 2007 10:53 AM, David Scott <[EMAIL PROTECTED]> wrote:
> I have a field in a DB that contains something like
> "lvlscore4:4493,lvlscore5:3232,lvlscore6:6128"
> I need to select all records where the "lvlscore5:" is greater than 3000.
> I think this ca
; "lvlscore4:4493,lvlscore5:3232,lvlscore6:6128"
> I need to select all records where the "lvlscore5:" is greater than 3000.
> I think this can be done using REGEXP but I have read the docs and am non
> the wiser for it. Can anyone point me in the right direction?
> --
I have a field in a DB that contains something like
"lvlscore4:4493,lvlscore5:3232,lvlscore6:6128"
I need to select all records where the "lvlscore5:" is greater than 3000.
I think this can be done using REGEXP but I have read the docs and am non
the wiser for it. Can anyone p
hing that start with "foo" then followed by a string
containing letter/number/underscore/dot but NOT end with the string
"linux". When I use the pattern 'foo[(a-z|0-9|_|.)]+(?!linux)' , I got
"ERROR 1139 (42000): Got error 'repetition-operator operand inv
epetition-operator operand invalid'
from regexp".I got the look-ahead assertion syntax (?!string) from
Perl regexp, but mysql apparently doesn't like that.
Specially, the following should match:
foodafdlj_endwithx
food3242jljlsd.endwithn
but this should NOT match
foosdfjl.blah_linux
any suggestions?
thanks!
>I'ld like to accomplish something like:
>
>set @myvar=concat_ws(",",(SELECT column from table1 order by column;
>where ...))
>
>or
>
>select concat_ws(",",(SELECT column from table1 order by column where ...));
>
>for further usage in sql-scripts
I forgot to mention: As I need it in a function
hi all,
Here's a nut to crack:
I would like to extract a part of a string stored in a varchar column in a
mysql table.
Since the part of string I want to extract is neither at a fixed position
nor logically separated by a fixed character I was thinking using regexp
would by a good idea
S
hi all,
Here's a nut to crack:
I would like to extract a part of a string stored in a varchar column in a
mysql table.
Since the part of string I want to extract is neither at a fixed position
nor logically separated by a fixed character I was thinking using regexp
would by a good idea
S
it gave me any characterset information.
Client characterset:latin1
Server characterset:latin1
Once I thought I understood what was going on with COLLATE and case
sensitivity, I tried this command...
SELECT id, pswd, division, department, title, classification FROM pswds
WHERE pswd
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
>
nt characterset:latin1
Server characterset:latin1
Once I thought I understood what was going on with COLLATE and case
sensitivity, I tried this command...
SELECT id, pswd, division, department, title, classification FROM pswds
WHERE pswd REGEXP '[:lower:]' COLLATE latin1_bin;
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
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 wind up with 4 rows out of 25 that contain
Hi,
Try with
mysql > select 'oer bv' REGEXP '(^b|[[:blank:]])(!?v|$v)';
Thanks
ViSolve DB Team
- Original Message -
From: "Mike van Hoof" <[EMAIL PROTECTED]>
To: "mysql"
Sent: Monday, January 08, 2007 5:40 PM
Subject: Re: MYSQL REGEXP
Hello,
this doesn't work:
mysql> SELECT 'oer bv' REGEXP '[b|^b](!?[v$|v])';
+----+
| 'oer bv' REGEXP '[b|^b](!?[v$|v])' |
++
| 1 |
+
Hi,
[ERROR 1139 (42000): Got error 'repetition-operator operand invalid' from
regexp]
because,
In your query,
'!' is an Operator and ? is a wild character. Only wildcharacters should be
follow the Operators.
Try with.
SELECT 'boer bv' REGEXP '[b|^b](!
Hello,
i am try to make a regular expression work, but keep getting this error
message:
does anyone know how i can make it work?
The query is:
SELECT 'boer bv' REGEXP '[ b|^b](?![v$|v ])';
So it has to match each starting 'b' and all the b's pf following w
Hello,
i am try to make a regular expression work, but keep getting this error
message:
does anyone know how i can make it work?
The query is:
SELECT 'boer bv' REGEXP '[ b|^b](?![v$|v ])';
So it has to match each starting 'b' and all the b's pf following w
ing
>
> mysqlhotcopy ...connect-options... --regexp /~^db_name$/
> or
> mysqlhotcopy ...connect-options... --regexp /~^db_name$/ /path/to/new/dir
>
> On 5/25/06, MF <[EMAIL PROTECTED]> wrote:
> > Hi, how to write pattern for backup all datases except one?
> >
&g
You should just be doing
mysqlhotcopy ...connect-options... --regexp /~^db_name$/
or
mysqlhotcopy ...connect-options... --regexp /~^db_name$/ /path/to/new/dir
On 5/25/06, MF <[EMAIL PROTECTED]> wrote:
Hi, how to write pattern for backup all datases except one?
I try this, but not w
Hi, how to write pattern for backup all datases except one?
I try this, but not work as expecting.
mysqlhotcopy ...connect-options... --regexp /~^db_name$/./.*/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL
Kim Christensen wrote:
Is there any way to build a REGEXP pattern set by using a subquery?
I have a set of rows in table "table", with the column "value" being
target for my query. That column's content is a bracket separated list
of values, like this:
[118][Wor
http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html
Kim Christensen wrote:
> Is there any way to build a REGEXP pattern set by using a subquery?
>
> I have a set of rows in table "table", with the column "value" being
> target for my query. Th
Is there any way to build a REGEXP pattern set by using a subquery?
I have a set of rows in table "table", with the column "value" being
target for my query. That column's content is a bracket separated list
of values, like this:
[118][Word][Integer][Stuff]...
[67][Anot
Oskar Joelson wrote:
I found this in
http://dev.mysql.com/doc/refman/5.0/en/string-comparison-functions.html
:
"REGEXP and RLIKE use the current character set (cp1252 Latin1 by
default) when deciding the type of a character. Warning: These
operators are not multi-byte safe."
"
Hi!
I hope this is the right mailing list for my problem. :)
I recently changed the collation/character set in the whole database
for a project I'm working on to utf8. After a while I realized that
REGEXP didn't work as it used to. I looked in the manual and saw that
REGEXP was not
John thegimper wrote:
Ok how can i mix boolean and regexp searches?
SELECT * FROM tbl WHERE MATCH (name) AGAINST ('TEST' IN BOOLEAN MODE) OR name
REGEXP 'TEST';
That dont work :(
"That dont work" does not provide any useful information on which to base a
Ok how can i mix boolean and regexp searches?
SELECT * FROM tbl WHERE MATCH (name) AGAINST ('TEST' IN BOOLEAN MODE) OR name
REGEXP 'TEST';
That dont work :(
Quoting [EMAIL PROTECTED]:
> John thegimper <[EMAIL PROTECTED]> wrote on 08/22/2005 04:55:46 AM:
>
Enrique Sanchez Vela wrote:
John,
using 'one.*two|two.*one' would do it. :)
regards,
esv.
That will work, but doesn't generalize very well. Imagine how that will
look with 4 or 5 search terms.
LIKE and REGEXP are meant to match strings, not find words. They are
ill-su
mper wrote:
> > > Thanks so there is no operator that tells mysql that both words must
> > match?
> > >
> > > "one|two" is equal to "one OR two"
> > > I want an operator that is equal to "one AND two" but i guess i will
>
; >
> > "one|two" is equal to "one OR two"
> > I want an operator that is equal to "one AND two" but i guess i will
> have to
> > use match in boolean mode for that?
>
> Why not use full-text searching instead of regexp?
>
> Jasper
full-text searching instead of regexp?
Jasper
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
lt;[EMAIL PROTECTED]>:
>
> John,
>
> using 'one.*two|two.*one' would do it. :)
>
> regards,
> esv.
>
>
> --- John thegimper <[EMAIL PROTECTED]> wrote:
>
> > ok just figured out that if the database contains
> > "one and one is two&qu
John,
using 'one.*two|two.*one' would do it. :)
regards,
esv.
--- John thegimper <[EMAIL PROTECTED]> wrote:
> ok just figured out that if the database contains
> "one and one is two"
> and i use regexp to search for "one two" it will not
&g
possible answers to your request are:
select * from tablename where stringname REGEXP
'SAMSUNG[^4]*40GB';
select * from tablename where stringname REGEXP
'SAMSUNG.*40GB'
they both matched your sample string, I personally
like the first one better but it is up to you the
ok just figured out that if the database contains "one and one is two"
and i use regexp to search for "one two" it will not match.
If i search for "one(.*)two" it will.
But how can i make it match if i search for "two one" ?
Quoting John thegimper <[EMAI
Here is another user with the same problem
http://forums.pcworld.co.nz/archive/index.php/t-34536.html
Maybe his explanation is better :)
Quoting John thegimper <[EMAIL PROTECTED]>:
> SELECT * FROM tbl WHERE item REGEXP 'SEARCHSTRING'
>
> Database holds:
> SAMSUNG
SELECT * FROM tbl WHERE item REGEXP 'SEARCHSTRING'
Database holds:
SAMSUNG IDE 40GB 7200RPM
Search for
SAMSUNG IDE 7200RPM = 0 RESULTS
SAMSUNG 40GB 7200RPM = 0 RESULTS
SAMSUNG +40GB +7200RPM = 0 RESULTS
SAMSUNG IDE 40GB = 1 RESULT
How do i need to change the SEARCHSTRING to use AN
know about REGEXP.
REGEXP, LIMIT and LOAD DATA INFILE?
For example, I cannot seem to pass in the {pattern} as a parameter to
my SPROC, and then query for ...WHERE field REGEXP pattern
I'm having the same problem passing in the {count,offset} parameters
for LIMIT clauses, and the {filename
Am I correct in assuming that MySQL requires string literals in stored
procedures for the following clauses:
REGEXP, LIMIT and LOAD DATA INFILE?
For example, I cannot seem to pass in the {pattern} as a parameter to
my SPROC, and then query for ...WHERE field REGEXP pattern
I'm having the
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 sur
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
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 elb
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
Who
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
I'm having a problem with REGEXP and word boundaries, my query does not
throw an errow, but isn't giving me any results e.g. my query is:
SELECT * FROM object WHERE description REGEXP '[[:<:]]elbow[[:>:]]';
There are records in the object table that have the followi
qld will
quit with a SIGSEGV signal.
SELECT post_urltitle
FROM evo_posts
WHERE post_urltitle
REGEXP '^erster_eintrag(_[0-9]+)?$' AND ID <> 0;
>How-To-Repeat:
Just execute the just provided SQL expression on the
same FreeBSD system.
>Fix:
No idea.
>Submitter-Id:
>O
At 4:01 +0200 10/8/04, Przemyslaw Popielarski wrote:
Paul DuBois <[EMAIL PROTECTED]> wrote:
SELECT
@a:=FIRMLEGALZIPCODE
FROM tCustomers
WHERE @a REGEXP "[0-9]"
-> Empty set (0.03 sec)
You're expecting the value to be selected first so that you then can
test it wit
Paul DuBois <[EMAIL PROTECTED]> wrote:
>> SELECT
>>@a:=FIRMLEGALZIPCODE
>> FROM tCustomers
>> WHERE @a REGEXP "[0-9]"
>> -> Empty set (0.03 sec)
>
> You're expecting the value to be selected first so that you then can
> test
At 3:47 +0200 10/8/04, Przemyslaw Popielarski wrote:
Paul DuBois <[EMAIL PROTECTED]> wrote:
User variables do not work with REGEXP under MySQL 4.0.21 & 4.1.5.
Is this a bug or a feature?
It's difficult to provide an answer to this because you're providing
no information abo
Paul DuBois <[EMAIL PROTECTED]> wrote:
>> User variables do not work with REGEXP under MySQL 4.0.21 & 4.1.5.
>> Is this a bug or a feature?
>
> It's difficult to provide an answer to this because you're providing
> no information about what "do not wo
At 3:12 +0200 10/8/04, Przemyslaw Popielarski wrote:
User variables do not work with REGEXP under MySQL 4.0.21 & 4.1.5.
Is this a bug or a feature?
It's difficult to provide an answer to this because you're providing
no information about what "do not work" means. Can you
User variables do not work with REGEXP under MySQL 4.0.21 & 4.1.5.
Is this a bug or a feature?
--
./ premax
./ [EMAIL PROTECTED]
./ koniec i bomba, a kto czytal ten traba. w.g.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
On 30 Jun 2004 17:45:06 +0200, wrote:
>In article <[EMAIL PROTECTED]>,
>SGreen writes:
>
>> SELECT t1.*
>> FROM ytbl_development t1
>> INNER JOIN tmpShortCodes sc
>> ON INSTR(t1.txtDevPostCode, sc.short_code) =1
>
>This is the same as
>
> SELECT t1.*
> FROM ytbl_development t1
> INNER JOIN tmp
Sent by: newsFax to:
<[EMAIL PROTECTED]Subject: Re: Using REGEXP
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] writes:
> SELECT t1.*
> FROM ytbl_development t1
> INNER JOIN tmpShortCodes sc
> ON INSTR(t1.txtDevPostCode, sc.short_code) =1
This is the same as
SELECT t1.*
FROM ytbl_development t1
INNER JOIN tmpShortCodes sc
ON t1.txtDevPostCode LIKE
were
hoping to do with the regexp. Since your list is comma-separated, we can
use FIND_IN_SET to compare the portion of the postcode to the list. So,
SELECT * FROM ytbl_development AS t1
WHERE FIND_IN_SET(LEFT(t1.txtDevPostCode,LOCATE(' ',t1.txtDevPostCode)+1),
&
<[EMAIL PROTECTED]To: [EMAIL PROTECTED]
>cc:
Sent by: newsFax to:
Michael
Ignoring my attempt at a query, I'll restate the problem
T1.devtxtpostcode contains full UK Postcodes eg OX14 5RA, OX14 5BH, Se1 1AH, etc
I want to check if a particular postcode is within a list of postcode areas, these
postcode areas
are naturally shorter ie ox14 5,ox14 6 etc. So I ne
I'm sorry for my overly terse reply.
Perhaps I'm being dense, but I just don't get it. Your REGEXP matches a
string which starts with 1 or 2 letters, followed by 1 or 2 digits, followed
by 0 or 1 letters, which tells me a short postcode would be 'OX14' or
'
like you're looking for the
result of your REGEXP in a list. REGEXP returns only a 0 or 1, not the
expression resulting from performing a REGEXP.
Wes
On Jun 29, 2004, at 9:25 AM, zzapper wrote:
Hi,
select * from ytbl_development as t1
where (t1.txtDevPostCode REGEXP
"^[[:alpha:
On Tue, 29 Jun 2004 15:13:10 -0400, wrote:
>zzapper:
>
>I could be reading it wrong, but it looks like you're looking for the
>result of your REGEXP in a list. REGEXP returns only a 0 or 1, not the
>expression resulting from performing a REGEXP.
>
>Wes
>
>On J
zzapper:
I could be reading it wrong, but it looks like you're looking for the
result of your REGEXP in a list. REGEXP returns only a 0 or 1, not the
expression resulting from performing a REGEXP.
Wes
On Jun 29, 2004, at 9:25 AM, zzapper wrote:
Hi,
select * from ytbl_development as t1
A quick review of the REGEXP portion of the manual helped me to understand
what went wrong:
http://dev.mysql.com/doc/mysql/en/String_comparison_functions.html
REGEXP is a comparitor, not a function. It works like "=" or ">" and the
result is a boolean value.
Were yo
Hi,
select * from ytbl_development as t1
where (t1.txtDevPostCode REGEXP "^[[:alpha:]]{1,2}[[:digit:]]{1,2}[[:alpha:]]{0,1}" in
#QuotedValueList(qryRadius.shortpostcode)#)
The above Where clause doesn't work , it just seems you can't use REGEXP this way
qryRadius.shortpost
Hi,
select * from ytbl_development as t1
where (t1.txtDevPostCode REGEXP "^[[:alpha:]]{1,2}[[:digit:]]{1,2}[[:alpha:]]{0,1}" in
#QuotedValueList(qryRadius.shortpostcode)#)
The above Where clause doesn't work , it just seems you can't use REGEXP this way
qryRadius.shortpost
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
1 - 100 of 212 matches
Mail list logo