At 2:44 PM +0000 9/3/04, Chip Salzenberg wrote:
According to [EMAIL PROTECTED] (Dan Sugalski):
*) extract substring

Rather than that, wouldn't you prefer to make "substring of target string" the actual target of all these?

Only if the resulting substring'd be used in the match. Otherwise you're better off with just offset or offset/length, and defer substring extraction until the very end, and only if there are captures.


>*) exact string compare
*) find string in string
*) find first character of class X in string
*) find first character not of class X in string
*) find boundary between X and not-X
*) Find boundary defined by arbitrary code (mainly for word breaks)

Also, I imagine you'll want a backwards/forwards option on some of them, to support the p6 equivalent of /a.*b/.

Yeah, I'd not thought about backwards searching. These would need ranges for searching as well, to restrict how much of the string they'd look through.
--
Dan


--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to