Sometimes I have something in \2 and sometimes not.
I want to output -\2- only if there is something in it (it becomes likes -aaa-) and if not, I don't want an output like this --
Is this possible with REGEX or should I go for more complicated scripts?
Are there condition matching in the output in REGEX?
OK, something is wrong.
My code works here. Perhaps I misunderstand the problem.
I think it is best to wait. There may be a better reply to this problem soon.