Hi,

Normally I would tend to think, that I am 
quite familiar with regex and their usage
(background: UNIX?Linux, sed, vi/vim, Perl...)

Then I played a little with regex-match...and
I have to go to school again..,,

>From the Racket guide:
> (regexp-match #rx"([a-z ]+;)*" "lather; rinse; repeat;")          
'("lather; rinse; repeat;" " repeat;")

[a-z ]: matches one lowercase character of the range of a-z and the #\space
+     : the above one ore more times
;     : followed by a ';'
()    : all the above grouped 
*     : 0 or more times
seems obvious..

But the result is not (at least for me... ;)
'("lather; rinse; repeat;" " repeat;")

I understand "lather; rinse; repeat;" as match -
it reflects the "greedy behaviour" of regex.

But " repeat;" ???

Why not "rinse; repeat;" then???

I am buffled...<scratching my head>

(help!)+

:)

(Thank you)+ (much)+ in advance!
Cheers
Meino



-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to