Gil, I believe that /.^./ or /.$./ both satisfy your requirement.
Cheers, Peter Stockdill. -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Paul Gilmartin Sent: Tuesday, 9 July 2013 3:32 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: regex that never matches? Kind of a programming challenge, in view of all the PCRE chatter hereabouts lately: A vendor once supplied an interface where one of the required arguments was a regex to exclude from processing any matching line. But I wanted every line in my data processed. So, how? For my particular data, I could use: /Pattern that I know does not occur in my data/ or: / \000 \012 / ... unlikely to occur in lines processed by sed or awk. But is there a general case: a regex that will never match any string whatever? -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN