chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] 4.6.3 - regex behavior seems wrong


From: Alex Shinn
Subject: Re: [Chicken-users] 4.6.3 - regex behavior seems wrong
Date: Tue, 28 Dec 2010 14:39:03 +0900

2010/12/28 Matt Welland <address@hidden>:
> I'm using the regex egg in 4.6.3
> (use regex)
>
> Regexs seem to have implict ^ and $ at the start and end. This differs most
> most regex implementations I'm familiar with.
>
> "^\\s+#" should match the line " # Hello" but does not.

"match" matches the entire string, "search" searches for
a match anywhere in the string:

#;4> (string-match "^\\s+#" " # Hello")
#f
#;5> (string-search "^\\s+#" " # Hello")
(" #")
#;6>

-- 
Alex



reply via email to

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