regex - Using replace-regexp with lisp expression -


i have line:

;last updated: sunday, january 23, 2011 

i replace date current time. so, used replace-regxp following key combinations:

m-x replace-regexp ret \(last updated: \)[a-z ,]*[0-9 ,]* ret \1\,(format-time-string "%a, %b %e, %y") 

but yields following result:

;last updated: tuesday, january 25, 2011unday, january 23, 2011 

how can replace-regexp replace whole of old date instead of first letter?

your regex matches upper case letters. since u in sunday lower case, matches last updated: s, that's gets replaces.

to fix add a-z character range.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -