Re: [9fans] anchors broken in the g command in sam on p9p?

2013-09-01 Thread smiley
Erez Schatz moonb...@gmail.com writes: Care to share your script here? I'd love to see what you came up with. OK. I've stripped-out the application-specific data from the script; here it is in its redacted form: ,{ ,y/form/ g/head/ s/(.|\n)*(Expected Page

Re: [9fans] anchors broken in the g command in sam on p9p?

2013-08-25 Thread Erez Schatz
On 22 August 2013 20:03, smi...@icebubble.org wrote: Well, I finally figured it out: how to use sam for Real Life Work(TM)! It took me about 8 hours to figure out, but I finally managed to create my first practical sam script. I just kind of pulled a Buddha, you know, I will not move from

Re: [9fans] anchors broken in the g command in sam on p9p?

2013-08-22 Thread Rudolf Sykora
On 21 August 2013 19:19, smi...@icebubble.org wrote: Rob Pike robp...@gmail.com writes: OK. How does one match the start/end of dot in a g// or v// regexp? ... seems like a good question to me Steve Simon in his Sam command reference card also uses ^ and $ for his TODAY example, so this

Re: [9fans] anchors broken in the g command in sam on p9p?

2013-08-22 Thread Rob Pike
Short answer: you can't. It would be nice though. -rob On 22/08/2013, at 4:24 PM, Rudolf Sykora rudolf.syk...@gmail.com wrote: On 21 August 2013 19:19, smi...@icebubble.org wrote: Rob Pike robp...@gmail.com writes: OK. How does one match the start/end of dot in a g// or v//

Re: [9fans] anchors broken in the g command in sam on p9p?

2013-08-22 Thread smiley
Well, I finally figured it out: how to use sam for Real Life Work(TM)! It took me about 8 hours to figure out, but I finally managed to create my first practical sam script. I just kind of pulled a Buddha, you know, I will not move from this spot until I can program sam! ;) Far from being

Re: [9fans] anchors broken in the g command in sam on p9p?

2013-08-21 Thread Rob Pike
Nothing. That's exactly what ^ and $ do. -rob

Re: [9fans] anchors broken in the g command in sam on p9p?

2013-08-21 Thread Rudolf Sykora
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/ /

[9fans] anchors broken in the g command in sam on p9p?

2013-08-20 Thread smiley
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. According to the docs, g/.+s$/ should check that dot ends with s. ,y/ /