I am a novice at Regex and would like to get some help on Regex non-capturing group.
('""dasgsa.txt dssdd "wqhweg.txt').match(/["']([^"']+)(txt)/gi)
returns [""dasgsa.txt", "wqhweg.txt"]
as expected.
('""dasgsa.txt dssdd "wqhweg.txt"').match(/(?:["']([^"']+))(txt)/gi)
returns [""dasgsa.txt", "wqhweg.txt"]
while I expected the result to be ["dasgsa.txt", "wqhweg.txt"]
Any help will be much appreciated.