I’d like to be able to match this entire line (to highlight this sort of thing in vim): Fri Mar 18 14:10:23 ICT 2011. I’m trying to do it by finding a line that contains ICT 20 (first two digits of the year of the year), like this: syntax match myDate /^*ICT 20*$/, but I can’t get it working. I’m very new to regex. Basically what I want to say: find a line that contains “ICT 20” and can have anything on either side of it, and match that whole line. Is there an easy way to do this?
I’d like to be able to match this entire line (to highlight this sort
Share
should do the trick.
.is a wildcard that matches any character, and*means you can have 0 or more of the pattern it follows. (i.e.ba(na)*will matchba,banana,banananananaand so on)