[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to match last part of fullpath in apt-file with a perl reg-exp?



a small correction of mine. i wanted to match not only last part but beggining 
of last part . so your solution is ok and thanks. Based on it with a small 
addition i can match the beggining of the last part of full path.

So:

'm[^\/]*$' (why \ needs quoting? , i think is not special character  in perl 
reg exprs)

'm[^/]*$' it will also match /bla/bla/blma 

And to match the beginning of the last part of full path :

'.*/m[^/]*$


Reply to: