in reply to Version history dilemma
Using the /i option on the match saves you from worrying about whether it's Version, VERSION, or version.next unless /version[: ]+([0-9.]+)/i; print "-$1\n";
I'm assuming you don't care at all what comes before VERSION, or after the number, so I'm ignoring all of that...
If the line really starts with -, and that's required, you could use:
next unless /^-.*?version[: ]+([0-9.]+)/i; print "-$1\n";
|
|---|