Re: irregex match objects

2022-03-04 Thread asebian
> I haven't looked very deep into this, but it seems the replacement > lambda is called with the same match object for every substitution. > You don't seem to distinguish between the different matches in any > way - the result of the lambda will always be the same. Thanks, felix for having a

Re: irregex match objects

2022-03-04 Thread felix . winkelmann
> Under these assumptions I concluded that it should be possible to > detect what has been matched by checking whether the indices of the > assoc. list are valid in the current match object, stopping after the > first successful test. > > (import (chicken irregex)) > ;;; swapping fred and wilma >

irregex match objects

2022-03-03 Thread asebian
Hi, I am new to chicken (and scheme in general) and got stuck. (I am not part of the mailing list yet, so please add my address manually in case you reply to the list.) I want to swap two submatches of a regex and came up with the idea of using named matches to detect what actually was found by