An example from http://www.ph.unimelb.edu.au/~ssk/vim/pattern.html:
a[bc]\{-}[cd] matches "abc" in "abcd"
a[bc]*[cd] matches "abcd" in "abcd"
Note however that a match that starts earlier is preferred over a shorter match:"a\{-}b" matches "aaab" in "xaaab".
1 comment:
Very useful.
Thanks
Vignesh
Post a Comment