searching-for-an-expression-within-a-word-range.rex

Pipelines v2.1

 

.....|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9....+....10...

Home

     **** Top of file ****
   1
   2 /* The following pipeline reads the file: winston.txt and searches for the expression:
   3    'B.G B[A-Z]+HE. .S W.TCH[A-Z]+ ..U,'.
   4
   5    For each record containing the expression, the pipeline produces an output record comprising the
   6    record number, followed by the record. */
   7
   8 Address Rxpipe
   9
  10 'pipe < (reg 3) &installdrive:\&installpath\examples\input\winston.txt',
  11      '| specs recno 1 1-* nw',                                       /* Record number in col 1.. */
  12         ,                                                            /* ..followed by record. */
  13         ,
  14         /* Perform a non-case-sensitive search between words 2 and 6 for the specified expression,
  15            it should match the record that begins with 'BIG BROTHER IS WATCHING YOU,'. */,
  16      '| locate w2-6 reg /B.G B[A-Z]+HE. .S W.TCH[A-Z]+ ..U,/',
  17      '| console'                                                     /* Display on the console. */
  18
  19 Say 'Hit Enter to close..'
  20 Parse Pull
  21
  22 Exit 0
     **** End of file ****