On Tue, Jul 9, 2013 at 9:56 AM, Paul Gilmartin <[email protected]> wrote: > On Tue, 9 Jul 2013 11:34:55 +0200, Boris Lenz wrote: > >>does >> >>/(?!)/ >> >>work for you? >> > Thanks! I never woulda thoughta that. Seems to work for sed and > grep; nearly an exhaustive sample. Now I need to try to understand it: > > It matches any string which is not ("!") matched by 0 or 1 ("?") copies > of the null string (which appears between "(" and "?"). The "(" and ")" > indicate grouping. I have no idea why that's necessary. Perhaps > operator precedence? Would any of /(?!)/, /(?)!/, or even /()?!/ work > alike? Why not? > > And, of course, there are many flavors of regex, all with different rules. > > Thanks again, > gil
Adjacent special characters (excludes all other characters) that would be extremely rare in actual input? -- Mike A Schwab, Springfield IL USA Where do Forest Rangers go to get away from it all? ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
