Filter fields from returned html data

Hi everyone, I am trying to grab the data on the field “note” that is passed out by an api, I am currently trying it with text parse match pattern but I am not sure if I am in the right patch


Hey Matt,

can you share the output bundle from the HTTP module or the text it self you are trying to parse? This way we can have a look and help with improving the pattern.

Or if you want to do it yourself, here: https://regex101.com/ you can use this tool to test out different patterns.

That the data that comes from http, I just need the data on note, from the following elements Username, Password and Package Name
blueprint.txt (1.2 KB)

I was able to filter the fields I want with this pattern

Username\s*([^\n]+)[\s\S]+?Password\s*([^\n]+)[\s\S]+?Package Name\s*([^\n]+)[\s\S]+?

But I am still getting extra characters that I don’t need, how can I remove the html p tags from it?


Hi @Matt11

Try out this method.

You can also do it in single option with stripHTML function.

Output

3 Likes

Hi @shirin_saleem thank you, it helped me a lot and I got a much better results, I just used the striphtml function on the text for the same setup I had on match pattern but for some reason it’s ripping off the last letter on the last field, can anyone advise me what’s wrong on it?