Extract value from String List

Hi,

I have the COLUMN which is a string showed as list of parameters.
I would like to take only one example of this list and extract it into a new column “EXTRACTION”

I do not want to use Cell Splitter Node because there are many values in there.
Could someone provide me the regex function for the string manipulation? -> Easiest is take the first example.

COLUMN EXTRACTION
[‘2019-03-18T19:32:59Z’, ‘2019-03-22T05:42:56+00:00’, ‘2019-02-21T19:28:46+00:00’, ‘2018-04-18T10:06:19Z’, ‘2019-03-20T18:30:03Z’, ‘2019-03-12T22:12:55+00:00’, ‘2019-01-07T18:23:27Z’, ‘2019-03-29T17:39:45+00:00’, ‘2019-03-18T01:18:33+00:00’, ‘2019-03-18T07:15:43+00:00’, ‘2019-03-18T20:10:54+00:00’, ‘2019-03-27T21:22:02Z’, ‘2018-11-13T17:16:44+00:00’, ‘2019-03-26T22:36:44+00:00’, ‘2019-03-29T14:04:49+00:00’, ‘2019-03-14T12:58:00Z’, ‘2019-03-28T19:43:02Z’, ‘2019-03-20T08:01:53Z’, ‘2019-03-07T21:44:26+00:00’, ‘2018-12-06T18:15:00Z’, ‘2018-11-20T20:40:00+00:00’, ‘2018-11-20T20:39:59+00:00’, ‘2019-02-27T20:09:59Z’, ‘2019-03-21T20:43:27+00:00’, ‘2018-07-23T16:18:57Z’, ‘2019-01-30T16:46:49+00:00’, ‘2019-03-22T20:09:41Z’, ‘2019-03-29T14:45:31Z’, ‘2019-01-23T20:36:44+00:00’, ‘2019-03-20T12:53:44Z’] '2019-03-18T19:32:59Z
[0, 35, 152, 473, 474, 149, 1198, 1207, 62, 63, 50, 897, 900, 249, 122, 1185, 1231, 103, 130, 129, 141, 142, 34, 110, 111, 319, 65, 57, 222, 2274, 2282, 409, 411, 1083, 1084, 61, 253, 1969, 1982, 172, 64, 102, 2471, 2476, 232, 618, 614, 2723, 576, 303, 304, 1288, 1256, 151, 22, 42, 150, 123, 66, 58, 563, 1366] 0
[‘iOS’, ‘Android’] iOS

Hi,

This expression does the task:
regexReplace($column1$, "(?:\\[[‘]?)(.*?(?=[’]?,))(.*)", "$1")

Best,
Armin

3 Likes

Hi @11atzitzi,

do you always want to extract the first element of the list? Or maybe a random one? You could also do that with a Java Snipped node.

Cheers,
David

[armingrudd] the solutions works. Many thanks.
DaveK, any value not necessarily the first one.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.