Click here to get back home

P~(ptilde) 0.9 released, new scripting language with novel regex

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
P~(ptilde) 0.9 released, new scripting language with novel regex ptilderegex 03-14-2008
Posted by bugbear on March 17, 2008, 6:20 am
Please log in for more thread options
ptilderegex wrote:
>> In article
>>
>>>> Perhaps you can list a couple of examples. People in this newsgroup
>>>> love showing others how easy it is to get things done with regular
>>>> expressions. :)
>>> A simple example: lets say that in Perl you have a regex but you don't
>>> know what it is. Its held in a string passed by some function and
>>> needs to be a parameter. Now, you want to strip everything but what
>>> matches each time. Or better yet, output what does match to one
>>> stream, and output what doesn't match to another (in one pass).
>> It sounds like most of your problem has little to do with regular
>> expressions and more to do with I/O management.
>>
>> while( <$fh> )
>> {
>> if( m/$regex/ ) { print $out "$`$'"; print $out2 $& }
>> else { print $out }
>> }
>
> The point of Ptilde is that you can do these complex stream
> transformations of any kind at all in one regex pass. What you've got
> above is a while loop, not a single regex pass.

You say that as if it's a bad thing.

BugBear

Posted by ptilderegex on March 18, 2008, 1:52 pm
Please log in for more thread options
> > The point ofPtildeis that you can do these complex stream
> > transformations of any kind at all in one regex pass. =A0What you've got=

> > above is a while loop, not a single regex pass.
>
> You say that as if it's a bad thing.
>

Not that the Perl solution given above is a bad thing, but we're just
saying that certain complex transformations can be done in P~ in a
single-pass regex, which can turn on/off or redirect transformation
output, or insert output at any nesting level of a subcomposition,
which is a feature that seems to add value to P~ relative to other NFA
regex engines that lack the equivalent of the Ptilde do-pattern.

Similar ThreadsPosted
ANN: A new scripting language Tao 0.9.0 beta released! April 26, 2005, 9:41 am
Re ANN: A new scripting language Tao 0.9.0 beta released! April 27, 2005, 1:55 am
Re ANN: A new scripting language Tao 0.9.0 beta released! April 27, 2005, 7:49 am
Re ANN: A new scripting language Tao 0.9.0 beta released! April 27, 2005, 9:51 am
Re ANN: A new scripting language Tao 0.9.0 beta released! April 27, 2005, 12:05 pm
Re ANN: A new scripting language Tao 0.9.0 beta released! April 27, 2005, 12:31 pm
Building Hierarchical Class Tree from custom Scripting Language September 9, 2004, 10:05 pm
any tools to enable test automation for scripting language like perl? October 8, 2004, 6:45 am
ANN: Dao 1.0.0-alpha is released June 11, 2006, 12:31 pm
ANN:Just released "The Webmaster Collection" October 3, 2006, 1:21 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap