Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6958813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:11:21+00:00 2026-05-27T15:11:21+00:00

I am writing a custom search engine for my website. I am trying to

  • 0

I am writing a custom search engine for my website. I am trying to make use of MySQL REGEXP feature. I would like to be able to search for a word separated by spaces to avoid the chances of getting suffixes or prefixes on a word. For example I am trying to search for “appreciate” I want appreciate, not appreciated or unappreciate or unappreciated. Any ideas on how I could do this with MySQL’s REGEXP? My idea for this was to look for spaces like maybe so:

^appreciate$|^appreciate[:space:]|[:space:]appreciate$|[:space:]appreciate[:space:]

I am sure they is a better way of doing it and I have no idea if that even works

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:11:22+00:00Added an answer on May 27, 2026 at 3:11 pm

    I think what you want is something like this:

    SELECT 'I appreciate you' REGEXP '[[:<:]]appreciate[[:>:]]'; /* matches */
    

    [[<:]] and [[>:]] are word boundaries. From the manual:

    These markers stand for word boundaries. They match the beginning and end of words, respectively. A word is a sequence of word characters that is not preceded by or followed by word characters. A word character is an alphanumeric character in the alnum class or an underscore (_).

    Edit: just to clarify, this also deals with situations where there’s a newline character after the word, or a comma, etc

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a custom blog engine and would like to have trackbacks similar to
I am writing a custom session handler in PHP and trying to make the
I'm trying to make custom suggestion to search dialog. I'm using a urimatcher to
I'm writing a custom WebFormViewEngine and i would like to figure out the name
When it comes to writing custom MySQL database-driven PHP session management for a VERY
I'm writing custom ActionFilterAttribute and trying to write some data directly into output stream
I'm writing an application that analyses search engine results. With the Google Search API
I have several pages listing search results, for each result I would like to
I'd like to create a custom agenda search which will find TODO items based
I am writing a custom Lucene.NET indexer to enable indexing of MS Word documents.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.