Re: behavior of m// operator
Nathan <user@xxxxxxxxxxxx> wrote:
According to the documentation this program should print nothing since
m// uses the last successful pattern match from m//, split, etc.
My docs don't explicitly say whether the regex used in a split counts
as previously "matched" or not in this context. Experimentally, it looks
to me like it does not.
Xho
--
--------------------
http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
.
Relevant Pages
- Re: Print Section of file
... Specifically, FS *can* be a regex (if it's not a single character, ... then awk assumes it's a regex). ... regex (in fact it never is, unless the context requires a regex). ... a relational expression or a boolean combination of patterns... ... (comp.lang.awk) - Re: minor re, problelm
... Precedence, context, and a peculiar behavior of "||" work together to ... The left operand is evaluated in boolean context, ... but not the list of captures. ... regex matches, that's it, so $pI is set to 1 and $vI remains undefined. ... (comp.lang.perl.misc) - Re: All languages are equally fit
... Nathan> occurs within any given language. ... I agree that this is analogous to lexical ambiguity. ... depending on context. ... Nathan> the ways that mathematical notation is completely unlike ... (sci.lang) - Re: All languages are equally fit
... Nathan> occurs within any given language. ... I agree that this is analogous to lexical ambiguity. ... depending on context. ... Nathan> the ways that mathematical notation is completely unlike ... (sci.lang) - Re: Java regex syntax
... writing does not qualify as context provided by you. ... So I tried "dumbing it down" by forcibly assigning the regex to ".". ... I simply want them to have an intuitive experience; more of them will have had experience with Perl and grep than Java: ... (comp.lang.java.programmer) |
|