From my research (lots of Googling), I can not see that this is possible, but it is still worth asking I think. I have a large collection of nodes like:
(org:Organization {name: "Organization 1234"})
where 1234 can be any non-negative integer.
In order to update the DB to work with a new API, I am wanting to rename each of these in the collection so that the result would look something like:
(org:Organization {name: "Org_1234"})
So, I need to mashup Org_ with the [0-9]+ regex match on the current property.
Truly, I am at a loss on where to even start. All I see in the documentation is that regex can be used as a predicate in the WHERE
clause (WHERE n.property =~ {regex}
). Is there a way using just Cypher as I am not using a Java library?
Assuming there is always a single space between "Organization" and the integer, you can brute force this pretty easily with just string functions.
Which returns