in reply to Re: Re: RegExp Delimiter
in thread RegExp Delimiter

// is an m-less form of m//. This means that m?? is the functional equivalent. Or m!!, m>> or even m**.

Considering // will soon be an operator, things are sure going to get interesting.

Update:
What Dog and Pony is talking about is this bit:
If "/" is the delimiter then the initial m is optional. With the m you can use any pair of non-alphanumeric, non-whitespace characters as delimiters. This is particularly useful for matching path names that contain "/", to avoid LTS (leaning toothpick syndrome). If "?" is the delimiter, then the match-only-once rule of ?PATTERN? applies. If "'" is the delimiter, no interpolation is performed on the PATTERN.
I find that I use hash-marks as a replacement more often than not(m##), or, on those occasions where that's no good, excamation marks (m!!). Now I remember why I don't use '?'.

Replies are listed 'Best First'.
Re(4): RegExp Delimiter
by Dog and Pony (Priest) on Sep 03, 2002 at 15:20 UTC
    // is indeed the m-less form of m//, but ?? is not, it is a special case of //. Which may lead to lots of confusion if one uses questionmarks as delimiters for their regexps.

    I assume you know this, just clarifying further for those that may not. :)


    You have moved into a dark place.
    It is pitch black. You are likely to be eaten by a grue.
Re^4: RegExp Delimiter
by Aristotle (Chancellor) on Sep 03, 2002 at 13:02 UTC
    On the other hand we will get the grammar to parse it correctly built right into the language, so discounting the fact that it may confuse humans, things will actually be less ambiguous.

    Makeshifts last the longest.