JSFiddle - React, Tailwind, and code Playground

by jrunning

HTML

<script src="https://cdn.jsdelivr.net/gh/eu81273/jsfiddle-console/console.js"></script>

JavaScript

var patt = /\s(?<actID>[\w\d-]+)\t(?<actDesc>[\w\d  .,&\(\)-]+)?\t(?<origDur>[\d]+)?\t(?<start>[-\d\w]+)?\t(?<end>[-\d\w]+)?/g

const data = `Activity ID	Activity Name	Original Duration	Start	Finish	Variance - BL1 Finish Date	BL1 Finish	Total Float
        S600-20-21	Executive Steering Committee	5	06-Jan-20	13-Jan-20	0	13-Jan-20	0
        S600-20-31	Steering Committee - Option Selection Meeting	2	13-Jan-20	15-Jan-20	0	15-Jan-20	0
        S600-20-019b10	Resource Center of Excellence- Review	20	15-Jan-20	12-Feb-20	0	12-Feb-20	0`;

for (let result of data.matchAll(patt)) {
	console.log(result.groups);
}