cancel
Showing results for 
Search instead for 
Did you mean: 

html-parsing in Cypher and/or APOC

janezic
Graph Voyager

Hello Neos,

I have a graph with nodes containing properties with html-code. I would like to parse these html-properties to find the href an <a>-tags and the text to which the href is linked.

Any idea how to realize this by Cypher / APOC?

THX, JJJ

1 ACCEPTED SOLUTION

Hello @janezic 🙂

You can use a regex like in other languages and especially the apoc.text.regexGroups() function.

Regards,
Cobra

View solution in original post

3 REPLIES 3

janezic
Graph Voyager

I guess since no-one replies there is no on-bard-solution for that, which brings me to the next question: if I have an html-text in one of my property nodes how could I loop through this property? I can get the length of the property (= length of html-text, but how do I write a cypher statement wich iterates from position 1 of this string to the last position of this string in steps of n characters?

Hello @janezic 🙂

You can use a regex like in other languages and especially the apoc.text.regexGroups() function.

Regards,
Cobra

This works very well, thank you for the hint.

JJJ