in reply to In my it is printing in the else i want to get output for the for loop in linux.

Why are you attempting to match a backslash "\" in a Linux directory structure ?
Some of your other choices in the regex are also questionable: The first part appears to be a "greedy" match for ALL characters.

We could help you if you post some data as to what you are looking for, and some sample directories you want matched.
Show both "match" and "not match" cases, along with what you are attempting to extract.

                "These opinions are my own, though for a small fee they be yours too."

  • Comment on Re: In my it is printing in the else i want to get output for the for loop in linux.