On Mon, 6 Feb 2012 10:29:07 -0600, McKown, John wrote:
>> -----Original Message-----
>> From: IBM Mainframe Discussion List
>> [mailto:[email protected]] On Behalf Of Bill Godfrey
>> Sent: Monday, February 06, 2012 10:19 AM
><snip>
>>
>> try this:
>>
>> awk 'sub(/CD[^Q]*QR/,"junkt")'
>>
>> or this:
>>
>> sed -e 's/CD[^Q]*QR/junkt/'
>>
>> Bill
>
>Will work on that specific example. But won't if a Q appears with some other
>character after it, before the first QR.
>
Yup. Bill and I made the same mistake. But I've used a similar
construct to skip to the next delimiter, such as:
"[^,]*, *" # skips to the next comma; swallows the comma and trailing
blanks.
-- gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN