apoc.text.regexGroups
Syntax |
|
||
Description |
Returns all groups matching the given regular expression in the given text. |
||
Arguments |
Name |
Type |
Description |
|
|
The text to extract matches from. |
|
|
|
The regex pattern to match. |
|
Returns |
|
Usage Examples
RETURN apoc.text.regexGroups(
'abc <link xxx1>yyy1</link> def <link xxx2>yyy2</link>',
'<link (\\w+)>(\\w+)</link>'
) AS output;
output |
---|
[["<link xxx1>yyy1</link>", "xxx1", "yyy1"], ["<link xxx2>yyy2</link>", "xxx2", "yyy2"]] |
RETURN apoc.text.regexGroups(
'Michael: 1234\nJennifer: 5678',
'(\\w+): (\\d+)'
) AS output;
output |
---|
[["Michael: 1234", "Michael", "1234"], ["Jennifer: 5678", "Jennifer", "5678"]] |