Create a regular expression that matches the outdated Pod list generated with pod outdated
command
const stdout = `
- CrittercismSDK 5.3.0 -> 5.3.0 (latest version 5.4.0)
- GCDWebServer 3.2.5 -> 3.2.7 (latest version 3.2.7)
`;
stdout.match(outdatedPodRegex());
//=> ['- CrittercismSDK 5.3.0 -> 5.3.0 (latest version 5.4.0)', '- GCDWebServer 3.2.5 -> 3.2.7 (latest version 3.2.7)']
npm install outdated-pod-regex
Return: RegExp
with g
and m
flags
const stdout = `
- CrittercismSDK 5.3.0 -> 5.3.0 (latest version 5.4.0)
- GCDWebServer 3.2.5 -> 3.2.7 (latest version 3.2.7)
`;
const regex = outdatedPodRegex();
regex.exec(stdout);
//=> ['- CrittercismSDK 5.3.0 -> 5.3.0 (latest version 5.4.0)', 'CrittercismSDK', '5.3.0', '5.3.0', '5.4.0']
regex.exec(stdout);
//=> ['- GCDWebServer 3.2.5 -> 3.2.7 (latest version 3.2.7)', 'GCDWebServer', '3.2.5', '3.2.7', '3.2.7']
regex.exec(stdout);
//=> null