in reply to Need help on regexp

You might try this:

/abcd_efgh\-1\.2\.3$/

It will match your wanted string and not the other one. But it may not be what you are looking for, possibly you want the regex to be more generic. But you don't give enough details on what you really need.

May be you rather need this:

/\w{9}\-\d(\.\d){2}$/

which will match many other strings, but still not the one you don't want. Please give more details on what you need.

Replies are listed 'Best First'.
Re^2: Need help on regexp
by 0day (Sexton) on Aug 03, 2013 at 15:18 UTC
    Laurent_R Your RE will not be a match string "abcd_efgh-1.2.3" from a string "abcd_efgh-1.2.3-hjik-3.4.5.tar.gz".

    Attention to the "end of string"

      I don't understand what you mean. Both my regexes match the string you want to match and don't match the string you don't want to match.

      ups.. we understand the problem differently