Can anyone please suggest me how we can create pattern for below string.
String stringToFind = "Abcdef_ghi_2.0-123_20150424_1642_text.tar.gz";
I have tried with given pattern, but no use. Felt that some where its not satisfying with pattern.
String pattern = "Abcdef_ghi_*_(\\d{8})_(\\d{4})_\\w+";
Thanks In Advance.
*doesn't mean what you think it means.String pattern = "Abcdef_ghi_[\\d.-]+_(\\d{8})_(\\d{4})_[.\\w]+";