Re: Gecos field regex - ignored?

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Philip Hazel
日付:  
To: Hans Grobler
CC: exim-users
題目: 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