🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: vmsnet.tpu
Article #102

Re: Pattern

#102
From: August Reinig
Date: Wed, 30 Dec 1992 21:55
30 lines
1553 bytes
>I came up with the following patterns:
>
>predig:=span('0123456789');			<--- for aaaa
>posdig:=anchor&span('0123456789');		<--- for bbbb
>per:='.';					<--- for .
>exp:=anchor&(notany('dD')|line_end);		<--- for X
>
>find :=((predig&per&exp)|(per&posdig&exp)|(predig&per&posdig&exp));
>
>However the above does detect numbers like 123.12D00, ie if I have more than >one digit after the period followed by D.

What version of TPU?  I haven't examined this in detail but your patterns look ok.  Why not try:

 ( (span("0123456789") + "."                      + notany("dD")) ! aa.X
 | (span("0123456789") + "." + span("0123456789") + notany("dD")) ! aa.bbX
 | (                     "." + span("0123456789") + notany("dD")))!   .bbX

and report the results.

You can use partial pattern assignment on your patterns to see who is matching what.

----

> how do I put a cursor on the end of a range?

position(end_of(<range>));

				August
				(former TPU developer, patterns were
				 my specialty)
Technical Details
Message-ID: <1992Dec30.215500.4383@nntpd.lkg.dec.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!mccall!infopiz!decwrl!pa.dec.com!e2big.mko.dec.com!nntpd.lkg.dec.com!augie!reinig
References: <1hsqeoINNmqe@usenet.INS.CWRU.Edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!mccall!infopiz!decwrl!pa.dec.com!e2big.mko.dec.com!nntpd.lkg.dec.com!augie!reinig
Newsgroups: vmsnet.tpu
Subject: Re: Pattern
Message-ID: <1992Dec30.215500.4383@nntpd.lkg.dec.com>
From: reinig@augie.enet.dec.com (August Reinig)
Date: Wed, 30 Dec 1992 21:55:00 GMT
Reply-To: reinig@augie.enet.dec.com (August Reinig)
Sender: reinig@augie (August Reinig)
References: <1hsqeoINNmqe@usenet.INS.CWRU.Edu>
Organization: Digital Equipment Corporation
Lines: 30