BaseElements-Plugin
BaseElements-Plugin copied to clipboard
How to make BE_RegularExpression only return groups ?
Hi,
here's the following code
Let ( text="1"&char(9)&"2"&char(9)&"3"&char(9)&"4"&char(9)&"5"&char(9)&"6"&char(9)&"7"&char(9)&"8"&char(9)&"9"&char(9)&"10¶A"&char(9)&"B"&char(9)&"C"&char(9)&"D"&char(9)&"E"&char(9)&"F"&char(9)&"G"&char(9)&"H"&char(9)&"I"&char(9)&"J"; BE_RegularExpression ( text ;"^(?:[^\t]*\t){2}([^\t]+)";"vm") )
it returns
1 2 3 A B C
While it only should return
3 C
That's because BE_RegularExpression returns all the result including matching part rather than just the groups,
as you can see here
https://regex101.com/r/QZtpNa/1
Thanks