src/vs/workbench/contrib/terminal/browser/links/terminalLinkOpeners.ts/TerminalLocalFileLinkOpener/extractLineColumnInfo
class TerminalLocalFileLinkOpener:	extractLineColumnInfo(link: string, uri: URI): ILineColumnInfo {
		const lineColumnInfo: ILineColumnInfo = {
			lineNumber: 1,
			columnNumber: 1
		};

		// Calculate the file name end using the URI if possible, this will help with sanitizing the
		// link for the match regex. The actual path isn't important in extracting the line and
		// column from the regex so modifying the link text before the file name is safe.
		const fileName = basename(uri.path);
		const index = link.indexOf(fileName);
		const fileNameEndIndex: number = index !== -1 ? index + fileName.length : link.length;

		// Sanitize the link text such that the folders and file name do not contain whitespace.
		let sanitizedLink = link.slice(0, fileNameEndIndex).replace(/\s/g, '_') + link.slice(fileNameEndIndex);

		// Remove / suffixes from Windows paths such that the windows link regex works
		// (eg. /c:/file -> c:/file)
		if (this._os === OperatingSystem.Windows && sanitizedLink.match(/^\/[a-z]:\//i)) {
			sanitizedLink = sanitizedLink.slice(1);
		}

		// The local link regex only works for non file:// links, check these for a simple
		// `:line:col` suffix
		if (sanitizedLink.startsWith('file://')) {
			const simpleMatches = sanitizedLink.match(/:(\d+)(:(\d+))?$/);
			if (simpleMatches) {
				if (simpleMatches[1] !== undefined) {
					lineColumnInfo.lineNumber = parseInt(simpleMatches[1]);
				}
				if (simpleMatches[3] !== undefined) {
					lineColumnInfo.columnNumber = parseInt(simpleMatches[3]);
				}
			}
			return lineColumnInfo;
		}

		const matches: string[] | null = getLocalLinkRegex(this._os).exec(sanitizedLink);
		if (!matches) {
			return lineColumnInfo;
		}

		const lineAndColumnMatchIndex = this._os === OperatingSystem.Windows ? winLineAndColumnMatchIndex : unixLineAndColumnMatchIndex;
		for (let i = 0; i < lineAndColumnClause.length; i++) {
			const lineMatchIndex = lineAndColumnMatchIndex + (lineAndColumnClauseGroupCount * i);
			const rowNumber = matches[lineMatchIndex];
			if (rowNumber) {
				lineColumnInfo['lineNumber'] = parseInt(rowNumber, 10);
				// Check if column number exists
				const columnNumber = matches[lineMatchIndex + 2];
				if (columnNumber) {
					lineColumnInfo['columnNumber'] = parseInt(columnNumber, 10);
				}
				break;
			}
		}

		return lineColumnInfo;
	}