i need to extract string which is test11_w_2_120, this can be start with anything, numbers, characters with underscore etc.. but the time stamp 20110704_033429_ with two underscores will be there and string ends with /.
string may contain like this also 20110704_043944_test11_22_w_2_120, but it always has timestamp with two underscores. even the path may change (/u/asak/DATE/TEST_LOGS) only timestamp with two underscore is constant.
with this string it'll not work, how to modify your pattern to accept this. after two underscores, it can contain any thing, any numbers, or characters,
with your code, it works fine if we give number with character. but only number as specified is not working..
This second one will remove everything that is before "test" so it should work with your second example as well (if you just want to keep the test* pattern)