Get all results with REGEX

Hello, The problem I encountered is that when I use my REGEX expression in the String Manipulator (which is apparently good, but could be anything), it only returns the first matching match from my string, not all of them. I would like your help on how I can make it list all matching matches from the string, not just the first one.
would be best if I could list them in separate lines. The string from which I would need the values is a single string.

my REGEX: regexReplace($Document$, “.<p\s+class="card–title">\s<a[^>]href="([^"])".*”, “$1”)

My string something like this:
<p class=““card–title””> <a class=“”“” title=““Test1"” href=”“https://www.test1.html”“>
<p class=”“card–title”“> <a class=”“”" title=““Test2"” href=”“https://www.test2.html”“>
<p class=”“card–title”“> <a class=”“”" title=““Test3"” href=”“https://www.test3.html”">

You can extract these URLs in different formats, e.g. row-wise using the Regex Extractor:

(I used a built-in regex for URL extraction here, but you can also use the one which you posted above if you’d prefer to restrict this baed on your structure).

Here’s the workflow:

4 Likes

Thanks a lot for the solution, but I’m actually looking for a free solution

It is free if you’re using a free KNIME :slight_smile:

3 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.