Pattern Matching

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mythnick
    New Member
    • May 2012
    • 1

    Pattern Matching

    hi

    i am pretty new to mysql, sorry if the question is to dum.

    how can i search " <a href="http://depositfiles.co m/files/*********"> " and delete it?
    every * is a number or a character.

    i found this on the internet:
    UPDATE wp_posts SET `post_content`
    = REPLACE (`post_content` ,
    'blabla',
    ' ');

    but it can be used only for exactly matches.
  • johny10151981
    Top Contributor
    • Jan 2010
    • 1059

    #2
    try this query

    Code:
    SELECT wp_posts WHERE post_content REGEXP '<a href="http://depositfiles.com/files/\.{9}">'
    for explanation please read pattern matching

    Comment

    Working...