--- Begin Message ---
Subject: |
Re: regexp problem in ldap.el |
Date: |
Tue, 12 Aug 2008 13:04:40 +0900 (JST) |
According to the rfc4512, \w is not good to match against attribute type
and options. With the attached patch, options containing hyphens are
successfully parsed.
P.S.
I submitted a bug report about regexp in ldap-search-internal last
December, but now I understand that it was a mistake.
---- patch from here ----
--- ldap.orig.el 2008-08-09 08:04:07.000000000 +0900
+++ ldap.el 2008-08-09 22:37:05.000000000 +0900
@@ -582,9 +582,9 @@
(end-of-line)
(point))))
(forward-line 1)
- (while (looking-at "^\\(\\w*\\)\\(;\\w*\\)?[=:\t ]+\\(<[\t ]*file
:\
//\\)\\(.*\\)$")
+ (while (looking-at "^\\([A-Za-z][-A-Za-z0-9]*\\|[0-9]+\\(\\.[0-9]+\\
)\
*\\)\\(;[-A-Za-z0-9]+\\)*[=:\t ]+\\(<[\t ]*file://\\)\\(.*\\)$")
(setq name (match-string 1)
- value (match-string 4))
+ value (match-string 5))
;; Need to handle <a href="file:///D:/...">file:///D:/...</a> as
g\
enerated by OpenLDAP
;; on DOS/Windows as local files.
(if (and (memq system-type '(windows-nt ms-dos))
---- patch ends here ----
--- End Message ---
--- Begin Message ---
Subject: |
Re: regexp problem in ldap.el |
Date: |
Tue, 12 Aug 2008 14:42:04 -0400 |
> According to the rfc4512, \w is not good to match against attribute
> type and options. With the attached patch, options containing hyphens
> are successfully parsed.
I've checked in a slightly altered version of your patch into CVS.
Thanks very much.
--- End Message ---