Re: Help with REGEXP

2015-03-22 Thread Jan Steinman
> 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

Re: Help with REGEXP

2015-03-19 Thread Paul Halliday
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: >

Re: Help with REGEXP

2015-03-19 Thread Michael Dykman
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.%.% > >

Re: Help with REGEXP

2015-03-19 Thread Olivier Nicole
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

Help with REGEXP

2015-03-19 Thread Paul Halliday
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!

Re: regexp in conditional

2014-01-07 Thread Larry Martell
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

Re: regexp in conditional

2014-01-07 Thread 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')

Re: regexp in conditional

2014-01-07 Thread Michael Dykman
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: >

Re: regexp in conditional

2014-01-07 Thread Peter Brawley
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

regexp in conditional

2014-01-07 Thread Larry Martell
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

Re: Is is possible to update a column based on a REGEXP on another column?

2011-01-24 Thread Johan De Meersman
> 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.

Re: Is is possible to update a column based on a REGEXP on another column?

2011-01-22 Thread Eric Bergen
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

Is is possible to update a column based on a REGEXP on another column?

2011-01-21 Thread Phil
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

Re: Alphabetical pagination mysql regexp query problem

2010-10-22 Thread Michael Dykman
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, &

Re: Alphabetical pagination mysql regexp query problem

2010-10-22 Thread bharani kumar
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

Re: Alphabetical pagination mysql regexp query problem

2010-10-21 Thread Michael Dykman
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

Alphabetical pagination mysql regexp query problem

2010-10-21 Thread 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

Mysql Regexp how long can it be?

2010-04-08 Thread Jelle Smet
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:

Re: REGEXP and unicode weirdness

2010-01-21 Thread fsb
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 '[[:&

Re: REGEXP and unicode weirdness

2010-01-21 Thread Paul DuBois
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 '[[

REGEXP and unicode weirdness

2010-01-21 Thread John Campbell
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 &#

Unprintable characters in regexp

2009-04-07 Thread Thomas Spahni
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

Re: REGEXP help Finding phone numbers (nnn) nnn-nnnn format

2008-12-03 Thread wim . delvaux
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]

Re: REGEXP help Finding phone numbers (nnn) nnn-nnnn format SOLVED

2008-12-03 Thread Paul Nowosielski
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,

REGEXP help Finding phone numbers (nnn) nnn-nnnn format

2008-12-02 Thread Paul Nowosielski
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

REGEXP case insensitive SQL QUERY

2008-09-10 Thread Bala Balaravi
How can I use REGEXP case insensitive SQL QUERY Ex: select * from table where a REGEXP 'abc' will match both 'abc' and 'ABC'

RE: REGEXP vs LIKE/OR

2008-08-15 Thread emierzwa
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

REGEXP vs LIKE/OR

2008-08-15 Thread Morten Primdahl
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

Re: A use for REGEXP, I think.

2007-12-10 Thread Rob Wultsch
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

Re: A use for REGEXP, I think.

2007-12-10 Thread David Scott
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

Re: A use for REGEXP, I think.

2007-12-09 Thread Rob Wultsch
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

Re: A use for REGEXP, I think.

2007-12-09 Thread Rob Wultsch
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

Re: A use for REGEXP, I think.

2007-12-09 Thread Michael Dykman
; "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? > --

A use for REGEXP, I think.

2007-12-09 Thread David Scott
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

Re: regexp negate string help

2007-09-25 Thread Baron Schwartz
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

regexp negate string help

2007-09-24 Thread Tang, Jasmine
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!

RE: partial string extraction with sql using regexp ?

2007-06-13 Thread Christian Hansel
>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

partial string extraction with sql using regexp ?

2007-06-13 Thread Christian Hansel
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

partial string extraction with sql using regexp ?

2007-06-13 Thread Christian Hansel
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

Re: REGEXP Character Classes

2007-05-02 Thread Paul DuBois
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

Re: REGEXP Character Classes

2007-05-02 Thread John Kebbel
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 >

Re: REGEXP Character Classes

2007-05-02 Thread John Kebbel
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;

Re: REGEXP Character Classes

2007-05-01 Thread Paul DuBois
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

REGEXP Character Classes

2007-05-01 Thread John Kebbel
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

Re: MYSQL REGEXP help

2007-01-08 Thread ViSolve DB Team
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

Re: MYSQL REGEXP help

2007-01-08 Thread Mike van Hoof
Hello, this doesn't work: mysql> SELECT 'oer bv' REGEXP '[b|^b](!?[v$|v])'; +----+ | 'oer bv' REGEXP '[b|^b](!?[v$|v])' | ++ | 1 | +

Re: MYSQL REGEXP help

2007-01-08 Thread ViSolve DB Team
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](!

MYSQL REGEXP help

2007-01-08 Thread Mike van Hoof
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

MYSQL REGEXP help

2007-01-08 Thread Mike van Hoof
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

Re: mysqlhotcopy regexp

2006-05-26 Thread MF
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

Re: mysqlhotcopy regexp

2006-05-25 Thread sheeri kritzer
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

mysqlhotcopy regexp

2006-05-25 Thread MF
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

Re: Creating REGEXP patterns with use of subquery

2006-02-03 Thread Michael Stassen
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

Re: Creating REGEXP patterns with use of subquery

2006-02-03 Thread Gleb Paharenko
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

Creating REGEXP patterns with use of subquery

2006-02-03 Thread Kim Christensen
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

Re: Can't get REGEXP to work properly with utf8

2005-11-17 Thread Jasper Bryant-Greene
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." "

Can't get REGEXP to work properly with utf8

2005-11-17 Thread Oskar Joelson
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

Re: MySQL REGEXP problems...

2005-08-23 Thread Michael Stassen
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

Re: MySQL REGEXP problems...

2005-08-22 Thread John thegimper
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: >

Re: MySQL REGEXP problems...

2005-08-22 Thread Michael Stassen
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

Re: MySQL REGEXP problems...

2005-08-22 Thread SGreen
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 >

Re: MySQL REGEXP problems...

2005-08-22 Thread John thegimper
; > > > "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

Re: MySQL REGEXP problems...

2005-08-22 Thread Jasper Bryant-Greene
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]

Re: MySQL REGEXP problems...

2005-08-22 Thread John thegimper
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

Re: MySQL REGEXP problems...

2005-08-21 Thread Enrique Sanchez Vela
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

Re: MySQL REGEXP problems...

2005-08-21 Thread Enrique Sanchez Vela
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

Re: MySQL REGEXP problems...

2005-08-21 Thread John thegimper
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

Re: MySQL REGEXP problems...

2005-08-21 Thread John thegimper
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

MySQL REGEXP problems...

2005-08-21 Thread John thegimper
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

Re: String Literals ONLY for REGEXP, LIMIT and LOAD DATA clauses in MySQL Stored Procedures?

2005-05-25 Thread Paul DuBois
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

String Literals ONLY for REGEXP, LIMIT and LOAD DATA clauses in MySQL Stored Procedures?

2005-05-25 Thread Scott Klarenbach
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

Re: REGEXP word boundary problem

2005-03-24 Thread Jigal van Hemert
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

Re: REGEXP word boundary problem

2005-03-24 Thread Paul Groves
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

Re: REGEXP word boundary problem

2005-03-24 Thread Usha
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"

Re: REGEXP word boundary problem

2005-03-24 Thread Jigal van Hemert
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

Re: REGEXP word boundary problem

2005-03-24 Thread Paul Groves
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

Re: REGEXP word boundary problem

2005-03-24 Thread Paul Groves
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

Re: REGEXP word boundary problem

2005-03-24 Thread Jigal van Hemert
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

REGEXP word boundary problem

2005-03-24 Thread Paul Groves
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

MySQL coredumps on FreeBSD if the SQL query contains a regexp expression

2005-03-10 Thread Daniel S. Haischt
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

Re: user variables and regexp

2004-10-07 Thread Paul DuBois
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

Re: user variables and regexp

2004-10-07 Thread Przemyslaw Popielarski
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

Re: user variables and regexp

2004-10-07 Thread Paul DuBois
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

Re: user variables and regexp

2004-10-07 Thread Przemyslaw Popielarski
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

Re: user variables and regexp

2004-10-07 Thread Paul DuBois
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 and regexp

2004-10-07 Thread Przemyslaw Popielarski
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:

Re: Using REGEXP

2004-07-01 Thread zzapper
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

Re: Using REGEXP

2004-06-30 Thread SGreen
Sent by: newsFax to: <[EMAIL PROTECTED]Subject: Re: Using REGEXP

Re: Using REGEXP

2004-06-30 Thread Harald Fuchs
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

Re: Using REGEXP

2004-06-30 Thread Michael Stassen
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), &

Re: Using REGEXP

2004-06-30 Thread SGreen
<[EMAIL PROTECTED]To: [EMAIL PROTECTED] >cc: Sent by: newsFax to:

Re: Using REGEXP

2004-06-30 Thread zzapper
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

Re: Using REGEXP

2004-06-29 Thread Michael Stassen
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 '

Re: Using REGEXP

2004-06-29 Thread Michael Stassen
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:

Re: Using REGEXP

2004-06-29 Thread zzapper
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

Re: Using REGEXP

2004-06-29 Thread Wesley Furgiuele
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

Re: Using REGEXP

2004-06-29 Thread SGreen
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

Using REGEXP

2004-06-29 Thread zzapper
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

Using REGEXP

2004-06-29 Thread zzapper
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

Re: REGEXP and word boundary match

2004-06-27 Thread Luke Majewski
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   2   3   >