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

  • SEARCH
  • Home
  • 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 9121501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:52:38+00:00 2026-06-17T05:52:38+00:00

I have a ordinary bbCode function that search for for example [b] and [/b]

  • 0

I have a ordinary bbCode function that search for for example [b] and [/b] in my posts and replace these with for example bold text. When a visitor search some a post on my blog, it can happen that he or she search after something that is a filename for a image ([img]path/to/image.jpg[/img]). If this happens, the image will be gone from the post due to the highlighting.

How can I make the search engine (which is a regular WHERE column LIKE '%string%') to not search within my bbCodes?

Thanks in advance.

  • 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-06-17T05:52:39+00:00Added an answer on June 17, 2026 at 5:52 am

    You could add another clause to exclude certain tags:

    WHERE column LIKE '%string%'
    AND column NOT LIKE '%[img]%[/img]%'
    

    Note that doing so will exclude all results with an [img] tag inside, even if there are other tags you may want to consider. Since this is probably not what you really want, you should leave your query as it is and do the replacement with a regular expression in PHP.

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

Sidebar

Related Questions

I have got Sinatra/Rails app and an action which starts some long process. Ordinary
I have a simple Google App Engine app, that I wrote using ordinary strings.
I have a function that toggles all of the others checkboxes when the last
I have a table whose TD's contain ordinary text. Is there a way to
I have a macro taking several parameters. Some of these are optional and if
Say I have an ordinary table in my db like so ---------------------------- | id
Anyone have a good reference for how to do a multivariate ordinary linear regression
Suppose I have a weak reference to a car which has an ordinary (strong)
I have a WPF window, which contains a button called Cancel. Under ordinary circumstances
So I have within a program an ordinary for loop through a vector of

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.