Friday, March 6, 2015

conversion file pattern <-> regex pattern

To check if a file path 'path' matches &backupskip,
the naive try

path ~=# &backupskip

does not work because &backupskip is a file pattern
as used for autocmd events. Is there a function
'file2regex()' that converts &backupskip to a Vim regex
pattern so that

path ~=# file2regex(&backupskip)

is true if and only if path matches &backupskip?

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: