Solved

MySQL Query: Detect Youtube Link

Posted on 2010-08-13
2
308 Views
Last Modified: 2012-05-10
I want a query like this:  
SELECT * from `Foobar` where (`fulltext` ????????? )

Open in new window



Where results must contain  youtube.com (case insensitive)
  AND results must also contain:
v=<the next charactor should be a letter or a number>


0
Comment
Question by:hankknight
2 Comments
 
LVL 14

Assisted Solution

by:Kalpan
Kalpan earned 200 total points
ID: 33428711
Please refer following for the searching and indexing with FULLTEXT

http://devzone.zend.com/article/1304

0
 
LVL 6

Accepted Solution

by:
nitinsawhney earned 300 total points
ID: 33428896
Try something similar to following.

SELECT * from `Foobar` where `fulltext` like '%youtube.com%' AND `fulltext` REGEXP ".*v=[0-9].*"

Basically in the REGEXP part we are trying to match string which has any characters before v= and then v= follows with a digit and then can have anything after that.

This REGEXP might have to tweaked for more strict checking.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question