#!/usr/bin/perl -w use strict; while ( <DATA> ) { s/(.*ing)(bob|fred|bill)(more)/\1HIT\3/; print $_ . "\n"; } __DATA__ somestringbobmoremore somestringfredmoremore somestringbillmoremore somestringtedmore
In reply to Negating a regexp by jxh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |