Mission: I want all id attributes to be remove from the input string (we can have more than one). Therefore the result needs to be: "<meta name="conf-con-path" content="/wiki2">"
Ok. But that doesn’t help me further, since I then have to use .groups(x), which I’m trying to avoid. Is it possible to create a regex pattern for my mission? The thread doesn’t help on that either.
@Steven_McKeering to the rescue! Is it possible to do in Regex without anyother coding in UiPath, meaning can we exclude the id-tag with regex code alone?
@yoichi and @ppr are REAL gurus (the real rescue crew) and are some of the most knowledgeable people on forums. I listen to them. Their advice trumps mine
What you are asking is not possible in 1 step.
Simplest option: You will need to use a replace activity. It’s really not a bad option - it’s easy. Keeping it simple is the goal always!
Use this pattern((?=id).*(?=name))in a Replace activity. Replacement pattern is “”. It will remove the highlighted element from the pattern.
Otherwise you could do it in two steps and join them. (More work).
Otherwise you’ll need to use groups.
See Section 4 of my mega post for information on groups if you want to use groups.
Why don’t you want to use groups or replace methods?
It’s always important to provide AS MUCH information on your text also this will give the best Regex pattern.
Just to understand you right. It will not be possible to do a match in Regex for everything else than the id tag? Or do you not know to do it and therefore suggest me to do a replace/remove?
I dont want to use replace/groups, if it can be done in Regex. I want to understand, how I can do a match on “everything else” than the id tag.
What you are wanting to not capture is in the middle of your string/sample. Regex is a tool to find a pattern of text. Unfortunately it is not possible with just one pattern with one result.