On 21 August 2013 07:11, <smi...@icebubble.org> wrote:
>
> Maybe someone here can help me make sense of this simple sam session:
>
> ,c
> this is a file, one of
> many files with singular
> and/or plurals
> .
> ,y/ / g/.+s$/ p
> plurals
>
> I would expect that to have responded with "thisfilesplurals".

,y/ / g/.+s/ p

does it

> According to the docs, g/.+s$/ should check that dot ends with "s".
>
> ,y/ / g/^[ao].*/ p
> singular
> and/or

>
> I would have thought that would return "aoneof".
>
similarly, I believe
,y/ / g/[ao].*/ p
would do it

I think the pattern in g must match the dot entirely...

(sure, I might be wrong, I haven't tested it thoroughly.)

PS.: I believe there are some dark places in the sam language that can
lead to unexpected behaviour. Particularly the line endings are a
pain.

Reply via email to