// @@INCOMPLETE@@ // by Scott McCoy [tag at cpan.org] /* Copying and Substituting Simultaniously */ dst = Regexp("this")->replace(src, "that"); /* Copying and replacing...Same thing */ dst = Regexp("this")->replace(src, "that"); /* Strip to basename */ // Note this is best done with string manipulation functions, regexp here is // wasteful. Same is true in perl. dst = Regexp("^.*/")->replace(argv[0], ""); string capword = Regexp("[a-z]+")->replace ("foo.bar", lambda (string c) { c[0] = upper_case(c[0]); return c; } ); /* For the captured substitution, I'll have to figure out PCRE. */ |