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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:12:52+00:00 2026-05-27T17:12:52+00:00

In text i want to find structures like every thing till some text, but

  • 0

In text i want to find structures like every thing till some text, but not match between some word.

Example in text:

Templates : You can add custom templates for your theme. Updated on 2010 look[124] end
Media RSS feed : Add the Cooliris Effect to your gallery Updated on 2011 look[124]
Role settings : Each gallery has a author Updated at 2010 ...  look[124] end
AJAX based thumbnail generator : No more server Updated on 2010 look[124] end limitation during the batch process Copy/Move : Copy or move images between Updated on 2010 this look[124] galleries Sortable Albums : Create your own sets of images Updated on 2010 this look[124] end
Upload or pictures via a zip-file (Not in Safe-mode)
Watermark function : You can add a watermark image or text 
...

I need to find “Updated .*[124] end” every match must start this “Update” and ends with “[number]” and word “end“. But some text looks very similar, but not ends with word “end“. This text must not mach. How to make it work?

I try to write

/Updated(.*?)\[.*?\]\send/msi

or

Updated(.*?)\[.*?\](?!Updated)\send

But this takes strings like:

Updated on 2011 look[124] Role settings : Each gallery has a author Updated at 2010 ...  look[124] end
Updated on 2010 this look[124] galleries Sortable Albums : Create your own sets of images Updated on 2010 this look[124] end

How to write regex witch skips bad matches?

http://regexr.com?2vh1j

Thanks for your opinion.

  • 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-27T17:12:53+00:00Added an answer on May 27, 2026 at 5:12 pm

    I think this is what you were trying for with your second regex:

    Updated\s++(?>(?!Updated\b|end\b)\S+\s+)*+end\b
    

    In other words, match Updated and look for the corresponding end. If you find another Updated first, you know you started at the wrong place, so abandon that match. I excluded end as well because that lets me match the words possessively (i.e., with *+); the regex never has to backtrack to find or (more importantly) eliminate a match.

    If you really have to specify the look[nnn] part, this should do the trick:

    Updated\s++(?>(?!Updated\b|end\b|look\[\d+\])\S+\s+)*+look\[\d+\]\s+end\b
    

    Add the i flag for a case-insensitive match if you need to, but you don’t need the m or s flags. If this seems overly complicated, it’s because I don’t know your data as well as you do. There’s a good chance this is all you really need:

    Updated(?:(?!Updated).)*\send
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to implement Find mechanism (like text editors or word) in my JTextPane.
What should be the RegEx if I want to find the text between the
I want to find all img tags in a string of text and put
Is it possible to parse the enetered text in the textinput,i want to find
I have two MySQL tables, and I want to find and replace text strings
What I want to do is use jQuery to find a piece of text
string one = find; combobox1.text = one; I want to use one i.e string
Like the title says, I want to replace a specific part of the text
I want to programatically set a text in my UITableView. I do not want
Hi in my input type text I want to call URL if user enters

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.