Answer the question
In order to leave comments, you need to log in
How to filter list of paths by pattern by regex in bash script?
There is a list of paths:
./path/20170116090256_WRP_A01.0242
./path/WRP_G01_006563
./path/WRP_G01_006563/sql/apps/pkgs
Compiled regular expression [AZ]{3}\_*$ , according to which the list is filtered. The following lines fall under this filter:
./path/20170116090256_ WRP_A01.0242
./path/ WRP_G01_006563
./path/
WRP_G01_006563 /sql/apps/pkgs
of the two (maybe more)
./path/ WRP_G01_006563
./path/ WRP_G01_006563/sql/apps/pkgs
./path/ WRP_G01_006563/another/path
leave only
./path/WRP_G01_006563
Tell me
what is wrong in the regular expression and how to fix it?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question