--- In [email protected], "Owen Watson" <[EMAIL PROTECTED]> wrote:
>
> Sorry. . .
> Tried
> textIn[?"([\x7F-\xFF]+)"]="Gremlin(\\1)"
> which works
> textIn[?"([\x7F-\xFF]+)"]="Gremlin(case ("tonumx",\\1))"
> and many variants, all of which gives me errors.
>

As I said, you want to match the ASCII, manipulate it with case
statements, then replace the string of hex codes with your formatted
string. You cannot manipulate the \\1 with powerpro commands as though
it were a variable. You have to put it into a variable first.

Any of these will work --

local mymatch

exec.setregex("onematch")
textIn = "abcÿçèdefg"
mymatch = textIn[?"[\x7F-\xFF]+"]
mymatch = case("tonumx", mymatch)
mymatch = case("upper", mymatch)
mymatch[?".+"] = "<b>Gremlin(\\0)</b>"
win.debug(mymatch)

;or
mymatch=""
exec.setregex("onematch")
mymatch = replace(case("upper", ;;+
case("tonumx", ;;+
match(textIn, ?"[\x7F-\xFF]+"))), ;;+
?".+", "<b>Gremlin(\\0)</b>")
win.debug(mymatch)

;or
mymatch=""
mymatch=match(textIn, ?"[\x7F-\xFF]+")
mymatch=case("tonumx", mymatch)
mymatch=case("upper", mymatch)
mymatch=replace(mymatch, ?".+", "<b>Gremlin(\\0)</b>")
win.debug(mymatch)

Regards,
Sheri


Reply via email to