2016-11-29 39 views

回答

1

你已經有正則表達式,它的類,你列出的所有字符:

[[email protected]#$%^&*() ] 

你必須通過一個空字符串全部替換,用你的語言的正則表達式/串API。

例如,在Java:

// The pattern can be declared as a constant, computed only once. 
Pattern p = Pattern.compile("[[email protected]#$%^&*() ]"); 

String newPropName = p.matcher(propName).replaceAll(""); 
0

有一個如此遠無證APOC功能,apoc.text.replace,你可以從你的Cypher代碼中使用。它接受一個正則表達式作爲它的第二個參數。 (因爲它是一個函數,它不以CALL子句調用。)

例如:

RETURN apoc.text.replace('[email protected][email protected]', '[[email protected]#$%^&*() ]', '') AS res; 

回報:

╒═══╕ 
│res│ 
╞═══╡ 
│1 │ 
└───┘