help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: search for time stamp


From: Kai Grossjohann
Subject: Re: search for time stamp
Date: Sun, 28 Sep 2003 11:42:39 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (berkeley-unix)

Zimmen Gnauh <address@hidden> writes:

>    use (re-search-forward "^??/??/?? ??:??:??:") to search for a

That look like a shell glob.  In shell globs, ? stands for any single
character (except /), whereas * stands for zero or more characters
(except /).

Regular expressions work differently: . stands for any single
character (except newline), and ?, + and * are suffixes.

a? means zero or one occurrences of a.
a+ means one or more occurrences of a.
a* means zero or more occurrences of a.

Thus, ".*" means zero or more occurrences of any character, which is
similar to the shell glob "*".

And "." means any single character, which is similar to the shell glob
"?".

-- 
Two cafe au lait please, but without milk.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]