2e5 @verb #51:"parse_subst" this none this rxdo #60 @program #51:"parse_subst" this none this recognized_flags = length(args) >= 2 ? args[2] | "gc" null_subst_msg = length(args) >= 3 ? args[3] | "Null substitution?" cmd = args[1] if (!cmd) return "/xxx/yyy[/[g][c]] [] expected.." endif bchar = cmd[1] cmd = cmd[2..length(cmd)] fromstr = cmd[1..(b2 = index(cmd + bchar, bchar, 1)) - 1] cmd = cmd[b2 + 1..length(cmd)] tostr = cmd[1..(b2 = index(cmd + bchar, bchar, 1)) - 1] cmd = cmd[b2 + 1..length(cmd)] cmdlen = length(cmd) b2 = 0 while ((b2 = b2 + 1) <= cmdlen && index(recognized_flags, cmd[b2])) endwhile return fromstr == "" && tostr == "" ? null_subst_msg | {fromstr, tostr, cmd[1..b2 - 1], cmd[b2..cmdlen]} . 0