I want to search date format like
but, in vi mode,
:/2019-07-12 11:22:33 is not executed by white space.
how can I search
(other format is not pretty)
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
"\ " will work.
Use backslash followed by white space.
e.g. looking for "cat del",
:/2019-07-12 11:22:33 fails to match the whitespace, it is likely an indication that the whitespace in the date you're trying to match isn't a plain space but rather a tab or something. Try
to match any single whitespace character or
to match any amount of whitespace (including zero).
(And as an aside, not that you don't need to drop to the colon prompt to search, you could search directly from command mode by just starting your search with a slash. -- From the colon, the search will place your cursor at the start of the line where the match was found, from command mode, the search will place your cursor at the start of the match.)