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

2013-09-01 Thread smiley
Erez Schatz 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/(Expected Page Title)<(.|\n)*updated.*>([0-9]+\/[0-9]+\/[0-9]+)<(.|\n)*/:Title: \2\n:Date:

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

2013-08-25 Thread Erez Schatz
On 22 August 2013 20:03, 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 this spot until I c

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 myst

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 wrote: > > > > On 21 August 2013 19:19, wrote: >> Rob Pike 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

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

2013-08-21 Thread Rudolf Sykora
On 21 August 2013 19:19, wrote: > Rob Pike 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 might actually be wrong. Ruda

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

2013-08-21 Thread Rudolf Sykora
On 21 August 2013 22:14, Rudolf Sykora wrote: > I think the pattern in g must match the dot entirely... Well, sorry, having checked the paper, this is not true. Ruda

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

2013-08-21 Thread Rudolf Sykora
On 21 August 2013 07:11, 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

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

2013-08-21 Thread smiley
Rob Pike writes: > Nothing. That's exactly what ^ and $ do. > OK. How does one match the start/end of dot in a g// or v// regexp? > -rob > Wait, Rob Pike? That "Rob Pike?" As in the guy who wrote the program? How fortuitous. :) I read your paper on sam, as well as the tutorial, and I unde

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

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

[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/