From: Jeff H. <Je...@Je...> - 2020-06-28 20:22:26
|
<html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body> <p>I am proposing a new stage that draws on NetRexx's Java heritage: REGEX (alternative name: GREP). It is a simple filter stage like LOCATE, but uses regular expressions. This gives it a much richer (as well as less comprehensible) set of selectors.</p> <p>I have submitted it to origin master for 3.09, but, René, if you object to mixing in regular expressions, I'd withdraw it.</p> <p>All, comments and suggestions are very much welcomed.<br> </p> <p><tt>/** regex<br> <br> >>--REGEX--+--------------------------+--regex_string-(1)---><<br> +-(--| options_string |--)-+<br> <br> options_string:<br> |--+---------+--|<br> +-NUMBERS-+ (2)<br> <br> <br> Records matching the RegEx are put out on primary output<br> Records not matching are put out on secondary, if connected, or discarded.<br> <br> (1) string is a Java RegEx expresion. null string passes all records.<br> (2) lines are prefaced with line number, 10 characters, right justified<br> <br> [Possible future options: BEFORE and AFTER, etc., to give context, ala GREP.]<br> <br> */<br> <br> /*<br> 20/ 6/28 Jeff Hennick<br> */<br> </tt></p> <p>Jeff<br> </p> </body> </html> |