>
> What's the right expression to find exponent and argument in:
> sin<sup>2</sup>(B/2 - C/2) ?
>
> I need to change it to: sin(B/2 - C/2)^2
>
> I tried with "(sin|cos|tan|cot|sec|csc)<sup>(\d)+</sup>(*)"
Please remember that ( and ) and * symbols are meta-characters, and need to be escaped.
Additionally the * symbol IS NOT have the meaning "whatever" string.
Please think about this:
- include your variable expressions in SPAN tags (or other similar) and use a CLASS or ID attribute for that tag, in order to identify it
- when you want to change the SPAN's content, just extract the data string, and pass in another data string
Best regards.
Ella