Ombir
Active Member
- Joined
- Oct 1, 2015
- Messages
- 433
Hi,
I've a string like "abc.txt def.txt lmn.png jkl.jpeg pvr.txt".
THis pattern "\w*(?=\.txt)" only extract file names of text files i.e abc,def,pvr.
Now I want the opposite of this. I want to extract file names that are not text i.e lmn and jkl
Please suggest the pattern to match this. If possible I would also like to extract extension names along with file name like lmn.png and jkl.jpeg for another scenario. Is it possible with Negative lookahead ?
I've a string like "abc.txt def.txt lmn.png jkl.jpeg pvr.txt".
THis pattern "\w*(?=\.txt)" only extract file names of text files i.e abc,def,pvr.
Now I want the opposite of this. I want to extract file names that are not text i.e lmn and jkl
Please suggest the pattern to match this. If possible I would also like to extract extension names along with file name like lmn.png and jkl.jpeg for another scenario. Is it possible with Negative lookahead ?