On Thu, 7 Jan 2016 18:07:11 -0700, Alan Young wrote:

>Paul Gilmartin wrote:
>> On Thu, 7 Jan 2016 12:56:14 -0700, Alan Young wrote:
>>
>>> It's just like a regexp or unix shell command, precede the special
>>> character with a escape backslash.
>>>
>>> find r'a\'\"b'
>>>
>>>
>> Nope:
>>
>>  SDSF EDIT    MAINTRCX (JOB06470) JESMSGLG                     Parameter not 
>> recognized
>>  Command ===> find R'foo \' bar \" wombat'                             
>> Scroll ===> CSR
>>  ****** ********************************* Top of Data 
>> **********************************
>>  ==MSG> -CAUTION- Profile changed to CAPS ON (from CAPS OFF) because the
>>  ==MSG>           data does not contain any lower case characters.
>>  ****** ******************************** Bottom of Data 
>> ********************************
>>
>>        
>> ┌───────────────────────────────────────────────────────────────────────┐
>>        │ Check for misspelled keywords or too many bounds or range 
>> parameters.   │
>>        
>> └───────────────────────────────────────────────────────────────────────┘
>>
>> Nope.  I had been pessimistic about this.  "regexp" and "unix shell command" 
>> are two different tnings.
>> As I read it, regcomp() has no facility for escaping delimiters.  That's 
>> left to the caller, as you mention,
>> "unix shell"  Or C compiler, or whatever, to do the escaping and pass the 
>> cooked string to regcomp().
>>
>> Apparently ISPF EDIT has no facility for excaping delimiters.  Never had, 
>> not even before regexp was
>> introduced to ISPF.  I believe (haven't tried it) that:
>>
>>     FIND C'foo \' bar \" wombat'
>>
>> ... will fail the same way because ISPF doesn't escape special characters.
>>
>> -- gil
>>
>>
>
>The spaces also need the escape backslash like this
>
>FIND r'foo\ \'\ bar\ \"\ wombat'
>
>Alan
>
It seems that only the first space after an escaped quote needs an escape.
FIND r'foo \'\ bar " wombat'
FIND r"foo ' bar \"\ wombat"

Bill

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to