in reply to Using a regex to extract a version from a Un*x path

Given your input I would write the regex as follows:

Match everything that:

It should be pretty straightforward to write such a regex and less complex than what you originally had.

Edit: OK, sorry, my example wouldn't match this as a version string: "v007". In this case it gets a bit more complicated.

  • Comment on Re: Using a regex to extract a version from a Un*x path