public void or() { String actual; using (Pnyx p = new Pnyx()) { p.readString(PLANETS_GODS); p.or(pn => { pn.grep("Cronus"); pn.grep("Uranus"); }); actual = p.processToString(); } Assert.Equal(PLANETS_GODS_TITANS, actual); }
// pnyx -e=documentation pncs.cmd.examples.documentation.library.ExampleLine or public static void or() { const String input = @"Line one: house Line two: cat, dog Line three: separation of economics and state "; using (Pnyx p = new Pnyx()) { p.readString(input); p.or(p2 => { p2.grep("cat"); p2.egrep("Line one.*"); }); p.writeStdout(); } // outputs: // Line one: house // Line two: cat, dog }