In ExtendScript, regular expression matching appears to have a bug.
This expression: "a_bs".match(/^\s*(A)(?:_B|_BS)?\s*$/i)
Evaluates to: a_bs,
It should evaluate to: a_bs, a
If I add another group it appears to work.
This expression: "a_bs".match(/^\s*((A)(?:_B|_BS)?)\s*$/i)
Evaluates to: a_bs,a_bs,a
Please fix this.
This expression: "a_bs".match(/^\s*(A)(?:_B|_BS)?\s*$/i)
Evaluates to: a_bs,
It should evaluate to: a_bs, a
If I add another group it appears to work.
This expression: "a_bs".match(/^\s*((A)(?:_B|_BS)?)\s*$/i)
Evaluates to: a_bs,a_bs,a
Please fix this.