Monday, February 27, 2012

HELP: REGEXP accurences count

Hello everyone,

sorry for my bad English. I have to create a query under mySQL for a
small research engine; I have to rate the results of a simple regular
expression matches inside a text field. I gave a look to the function REGEXP
that mySQL offers, but it seems do give just a boolean result, 1 or 0!!!
What i need is that the regexp funtion gave back the number of the total
matches occured inside a field of every line. Do you know if mySQL offers
this opportunity? Maybe using onother function instead REGEXP?

Thank you all,

Federico.Federico Bari (fede72bari@.tiscali.it) writes:
> sorry for my bad English. I have to create a query under mySQL for a
> small research engine; I have to rate the results of a simple regular
> expression matches inside a text field. I gave a look to the function
> REGEXP that mySQL offers, but it seems do give just a boolean result, 1
> or 0!!! What i need is that the regexp funtion gave back the number of
> the total matches occured inside a field of every line. Do you know if
> mySQL offers this opportunity? Maybe using onother function instead
> REGEXP?

This is a newsgroup about MS SQL Server which is a completely different
product from MySQL. You will have to find a forum for MySQL.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

No comments:

Post a Comment