I can only account for my own close vote, but I voted to close as requiring details or clarity. Ultimately, the post was closed as requiring debugging details, which I also agree with; when there are multiple different close votes, the majority reason is what gets displayed to the author of the post. On Stack Overflow, when a post accrues three close votes, it gets closed.
Like the regex tag info reveals, and gets displayed (very briefly) when you select this tag, we need to know which environment you need a regular expression for. Like you discovered, what works in one might not work in another. See also Why are there so many different regular expression dialects?
Furthermore, your exposition does not reveal in enough detail what result you expect. It's important to include this information for us to understand what you are really looking for, especially when the prose description of your problem is vague.
The notice which is displayed on top of your post links to the close reason with several links to more information about how to address the problems with your post and what's expected on Stack Overflow.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Probably also review the help center and in particular How to ask as well as the regex
tag info page.
Your post was edited by a helpful bystander to include some details which you only had revealed in comments, at which point the post was added to the review queue for reopening; but I personally don't think it is yet clear enough to warrant my vote to reopen it. Once you clarify it sufficiently, it can be reopened and answered (though your question seems like it's probably already answered many times, including in the regex tag info page, in which case reopening it only to have it be closed again as a duplicate is pointless).
In general, your question should be self-contained; even if somebody asks for a clarification in a comment, it's better to update the question itself, rather than respond with another comment. Comments are intended to be temporary, and can be deleted at any moment.
The fact that you received two different answers (one of which is deleted now) should also help you see how your question is ambiguous; the deleted answer probably is closer to what you actually want, but is based on speculation around your prose description, whereas the remaining answer is closer to answering what you currently seem to be asking.
"It doesn't work" is a red flag for many of us; it sounds like you get no result at all, but that can't be true, because the regular expression you tried should match something (though this too depends on which precise regular expression tool you are using and what your input data looks like). What results exactly do you get, and how do they differ from what you expect? Can you provide example data and the current as well as the desired result?
Attempting to use regular expressions to process XML-like formats is often misdirected. See also Why it's not possible to use regex to parse HTML/XML: a formal explanation in layman's terms
All of these points have been covered many, many times in the past. We do ask newcomers to spend some time learning how to use the site, and on investigating their problem in a search engine before asking.
<blah blah blah>stuff<blah blah blah>
does the opening tag and the closing tag have to be exactly the same, or anything is fine (You seem to be trying to parse some HTML / XML)? In your regex<{1}.*>{1}
what are you trying to do with those{1}
? One of the comments also asked you for some sample data so that your requirements would be more clear.<{1}.*>{1}
, exactly what do you expect this to mean, piece by piece? Specifically, what do you expect{1}
to mean in this context? We can only possibly explain what is wrong with your reasoning, if we understand what your reasoning is.