Reputation: 8413
Suppose I make a request in Neo4J (3.5) Cypher and I want to rewrite the last letter of the value in the property of a node rather than rewriting it.
I do add a string with the following request, but how to replace the last letter "a" for example with "o" and then add the string after?
MATCH (c:Context{name:'lisaksa'}) WITH c.name AS cname, c SET c.name = cname + '_new';
Upvotes: 0
Views: 243
Reputation: 5385
Try this:
MATCH (c:Context{name:'lisaksa'})
SET c.name = left(c.name,size(c.name)-1) + 'o'+'_new'
Upvotes: 1