Solved

MySQL Query: Detect Youtube Link

Posted on 2010-08-13
2
313 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

696 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