you
need ( to match ) not ( to match (. A ?[ list should specify for each
element what the matching element is perhaps
(?[( = ),{ = }, 01 = 10)
sort of hashish in style.
Perhaps the brackets could be defined as a hash allowing (?[%Hash)
Richard
--
[EMAIL PROTECTED]
--
David Cor
Some stuffbr
/p
Finally, tags which take arguments:
div align="center"Stuff/div
Would require some type of "this is optional" syntax:
/(?div\s*\w*)Stuff(?)/
Perhaps only the first word specified is taken as the tag name? This is
the XML/HTML spe
by
those who need them?
In principle, that's a very Perlish thing to do...
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
--
David Corbin
Mach Turtle Technologies, Inc.
http://www.machturtle.com
[EMAIL PROTECTED]
airs with the previous ?m, if there was one that
was matched. The | character separates or'ed sets consistent with other
regex patterns.
You can do that, or you can say it's done with backreferences (as noted
above)
-Nate
David Corbin wrote:
I never saw one comment on this, and the more I think ab
ow this could become a serious distraction to what I
perceive as the likely goals of Perl6.
--
David Corbin
Mach Turtle Technologies, Inc.
http://www.machturtle.com
[EMAIL PROTECTED]
(apply regular expression and only
keep keys that match)
--
Bron ( but I don't think the ugliness is worth it in the end.. )
--
David Corbin
Mach Turtle Technologies, Inc.
http://www.machturtle.com
[EMAIL PROTECTED]
you'd have to be consistent in what
you put in front of the text lines (and in the whitespace prefix
definition).
--
Bart.
Why not make the details of this controlled by a pragma?
--
David Corbin
Mach Turtle Technologies, Inc.
http://www.machturtle.com
[EMAIL PROTECTED]
revision that isn't in the old one
and warn the user.
I assume that this is really just another very small .pm file.
Thoughts?
--
David Corbin
Mach Turtle Technologies, Inc.
http://www.machturtle.com
[EMAIL PROTECTED]
the four I posted, originally, I've added two. Here's my
working list.
native pattern matching;
list manipulation
aweswome text processing.
It's application glue (thanks Tim)
Ability to write powerful 1-line programs.
Make easy things easy and hard things possible. (paraphrased, I
suspect)
--
this one.
# I'm not sure at all about these - I tend to avoid interpolation of
arrays and hashes for "safety"
$x = "xx@{array}yy"
$x = "xx{array[]}yy"
--
David Corbin
Mach Turtle Technologies, Inc.
http://www.machturtle.com
[EMAIL PROTECTED]
word board.
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
Laziness with responsibility http://www.tipjar.com/kcpm
--
David Corbin
Mach Turtle Technologies, Inc.
http://www.machturtle.com
[EMAIL PROTECTED]
.
--
David Corbin
Mach Turtle Technologies, Inc.
http://www.machturtle.com
[EMAIL PROTECTED]
@funx, sub {
print "I'll take a $name one, please, with @_.\n";
};
}
snip
--tom
Or consider this pseudo code -
open file
lock file
dump file
file gets removed
--
David Corbin
Mach Turtle Technologies,
things can
distinguish Perl from the other languages like pattern matching once
did. It strikes me as one of those things that are going to end up
adding a whole lot of power that wasn't expected, once people figure
them out.
--
David Corbin
Mach Turtle Technologies, Inc.
http://www.mach
David Corbin wrote:
Ariel Scolnicov wrote:
So how do I make Cfoo into an array in the first place? Well, I say
something like Cfoo = (1,2,3). But wait -- that's ambiguous! Is
Cfoo now a copy of the list (1,2,3) (in which case it's an array),
or is it a reference to (1,2,3
15 matches
Mail list logo