Thread: Regex in MySql

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2014
    Posts
    1
    Rep Power
    0

    Regex in MySql


    Hello, sorry for my English.
    Please help with pregex in MySql. I want to find two words in text. Between this words can be one or more spaces and/or punctuation mark. For example:
    Tree, apple
    Tree , apple
    Tree ,apple
    Tree , apple
    Tree,apple
    Thanks you!
  2. #2
  3. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,911
    Rep Power
    1045
  4. #3
  5. Come play with me!
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,745
    Rep Power
    9397
    If you're doing this for a type of search, use FULLTEXT indexes and MATCH...AGAINST, or go the more sophisticated route and set up a search service that you can query against without having to try to do the actual search stuff yourself.

IMN logo majestic logo threadwatch logo seochat tools logo