Re: Gecos field regex - ignored?

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Philip Hazel
Data:  
Para: Hans Grobler
CC: exim-users
Asunto: Re: Gecos field regex - ignored?
On Mon, 21 Oct 1996, Hans Grobler wrote:

> gecos_name = "$1"
> gecos_pattern = "^?\,^?"


No, not right. Try

gecos_name = "$1"
gecos_pattern = "^([^,]*),"

You need round brackets to pick out things for $1, $2, etc. That r.e.
reads

  ^     match start of text
  (     start of text for $1
  [^,]  match a character that is not a ,
  *     repeated zero or more times
  )     end of $1 text 
  ,     match a comma    



--
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714