[Info-vax] DCL and scripting
Dave Froble
davef at tsoft-inc.com
Wed Dec 12 20:34:26 EST 2018
On 12/12/2018 7:49 PM, Arne Vajhøj wrote:
> On 12/12/2018 12:40 AM, Dave Froble wrote:
>> On 12/11/2018 9:20 PM, Arne Vajhøj wrote:
>>> On 12/11/2018 3:11 PM, Jairo Alves wrote:
>>>>> F$REGEX_MATCH would not be that difficult.
>>>>
>>>> Suggestion:
>>>>
>>>> F$REGEX(input_string, regex_query, output_rule, modifiers)
>>>>
>>>> For example:
>>>>
>>>> $ str = "11-DEC-2018 17:24"
>>>> $ str = F$REGEX(str, "(\d{2})-(\w+)-(\d{4})", -
>>>> "$3_$2_$1", "UNGREEDY,CASE_INSENSITIVE")
>>>>
>>>> $ wr sys$output str
>>>> "2018_DEC_11"
>>>
>>> I think this is really F$REGEX_REPLACE.
>>
>> Not casting a handful of mud and such at anyone, but that is ugly, and
>> at least for me giberish. I don't want to even try to understand it.
>
> There is an old joke: I had a problem, then I decided to solve it using
> regex and now I have two problems.
>
> :-)
>
> Regex is a bit cryptic. But it can be useful.
>
> But I will say that all programmers should know SQL, regex and XPath.
>
> Arne
>
>
I know some SQL. I don't even know what regex and xpath is. I guess
according to you I should stick to flying. Oh well, much more fun anyway.
Now if it would just warm up ....
--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef at tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486
More information about the Info-vax
mailing list