I am trying to extract multiple sequences of numerical characters out of a long string. With regexp_extract, I am able to extract the first sequence, but how can I extract the following ones and write them into new columns (one column for every sequence)?
df.withColumn('IDENT1', F.df(bookings.IDENTIFIER, "(\d+)", 0))
+-----------------------------------------------------------------------------+----------+
|IDENTIFIER |IDENT1 |
+-----------------------------------------------------------------------------+----------+
|31010833 - 9911075145 - some more random text |31010833 |
|TL/9910900047/asdiqwoidw/more text// 23231263264 |9910900047|
+-----------------------------------------------------------------------------+----------+