2808 explained code solutions for 75 technologies

luaCapturing groups from regex

local str = 'Hi, Donald! Do you like Joe?';
local n1, n2 = str:match('(D.+\\?)!.+(J.+)?')ctrl + c
local str

sample string to capture regex groups from


match given string with specified regex and returns captured groups values

n1, n2

variables will get captured groups