|
Searching for an expression within a word range |
Pipelines v1.6 |
.* Example by TenFiftyTwo(c). |
.* The following pipeline reads the file: example.txt and searches for the expression:.* 'b.g b[a-zA-Z]+he. .s w.tch[a-zA-Z]+ ..u' .* For each record containing the expression, the pipeline produces an output record comprising the.* record number, followed by the record. pipe < &installdrive:\&installpath\Examples\Input\example.txt .* Read input file.
| specs recno 1 1-* nw .* Record number in col 1.. .* ..followed by record. .* Perform a non-case-sensitive search between words 2 and 6 for the specified expression, .* it should match the record that begins with 'BIG BROTHER IS WATCHING YOU,'. | locate anycase w2-6 reg /b.g b[a-zA-Z]+he. .s w.tch[a-zA-Z]+ ..u/ | console .* Display on the console.