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 8424483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:00:18+00:00 2026-06-10T04:00:18+00:00

I found this regex somewhere online that finds strings in my files that are

  • 0

I found this regex somewhere online that finds strings in my files that are likely presented to the user for a localization clean-up. However, I have a new task to find specific instances of two words and I thought I could use the same regex. I have tried several combinations but I’m just not good enough at regex to get it right.

Current regex for finding strings:

(?<=text=|label=|prompt=|toolTip=|title=|icon=|String=|Error=|Separator=|Symbol=)(("(?:\.|(\\\")|[^\""\n])*")|('(?:\.|(\\\')|[^\''\n])*'))

But now I want it to also capture if the words: catalog or in stock exist anywhere between the quotes.

Any help would be appreciated.

  • 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-10T04:00:20+00:00Added an answer on June 10, 2026 at 4:00 am

    OK, this should do it, I believe:

    (?<=text=|label=|prompt=|toolTip=|title=|icon=|String=|Error=|Separator=|Symbol=)((?:"(?:\.|(\\\")|[^\""\n])*\b(?:catalog|in stock)\b(?:\.|(\\\")|[^\""\n])*")|(?:'(?:\.|(\\\')|[^\''\n])*\b(?:catalog|in stock)\b(?:\.|(\\\')|[^\''\n])*'))
    

    All I did was add \b(?:catalog|in stock)\b in the quote section. For example, for the double-quote section, it used to be this:

    "(?:\.|(\\\")|[^\""\n])*"
    

    I.e. any number of non-quote (unless escaped), non-return characters between double-quotes.

    Now it is this:

    "(?:\.|(\\\")|[^\""\n])*\b(?:catalog|in stock)\b(?:\.|(\\\")|[^\""\n])*"
    

    Which is a double-quote, any number of legal characters as above, “catalog” or “in stock”, any number of more legal characters, and a quote.

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

Sidebar

Related Questions

After a lot of searching I found this regex that finds emails inside a
Found this question that explained a way to communicate between layers. However there is
I found this regex that works correctly but I didn't understand what is #
I have this regex ^(\d+)/\1$ that matches strings like 1/1 2/2 5/5 I want
I'm terrible with RegEx and found this bit somewhere on the interwebs. It's for
I found this regex which finds prices like 1.00 or $1.00. But it also
found this regex: insert every 10 characters: $text = preg_replace(|(.{10})|u, \${1}. , $text); can
I need a regex expert to help out on this one. Examples I've found
found this little code snippet that seems to do what i want, but im
I found this post: Python Regex vs PHP Regex but I actually did not

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.