[Info-vax] DCL and scripting

Craig A. Berry craigberry at nospam.mac.com
Tue Dec 11 19:55:49 EST 2018


On 12/11/18 2:11 PM, Jairo Alves wrote:

> $ str = "11-DEC-2018 17:24"
> $ str = F$REGEX(str, "(\d{2})-(\w+)-(\d{4})", -
>                  "$3_$2_$1", "UNGREEDY,CASE_INSENSITIVE")

I think your second parameter would have to be "''$3'_''$2'_''$1'"
because to be really useful, the captured matches would need to be
ordinary DCL symbols that would persist after the lexical call. And in
that case, you probably really couldn't call them $1, $2, $3, etc.
because that's going to conflict with existing usage somewhere. So,
sorry to say, but they would probably need to be something like
DCL$REGEX_MATCH_1, DCL$REGEX_MATCH_2, etc.



More information about the Info-vax mailing list