in reply to Re^3: Regex lookahead, lookbehind
in thread Regex lookahead, lookbehind
foo_bar_foo10.1.1.1.foo10.1.1.1.txt foo_bar_foo10.1.1.1.foo10.1.1.1.FOO-1.txt foo_bar_foo10.1.1.1.foo10.1.1.1.test_FOO1.txt foo_bar_foo10.1.1.1.foo10.1.1.1.test_FOO_abc_mon.txt
Above are the files which I need to query with regular expression. Out of which I need to pick only file2, file3, file4
and move them to some other directory. file1 should remain untouched.
Similarly sometime another set of files is as below
foo_foo_foo10.1.1.1.TEST.failed foo_foo_foo10.1.1.1.test_FOO1.failed
Out of which I need to pick only file2 and move them to some other directory. file1 should remain untouched.
As of now I have separte regex to filter and picking the desired files with grep -v.
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Regex lookahead, lookbehind
by choroba (Cardinal) on Feb 23, 2017 at 12:18 UTC |