1

I'd like to use regular expressions to replace text in TeXnicCenter. I think the capturing is done with []. But I can't find out how to use the captured text in the replacing text.

E.g. I want to replace "24h" with "24 h". It seems like I can capture the "4" using the search term "[\d]h". I tried "\1 h", "$1 h", ... as replacing text, but nothing works.

Does anyone now the RegEx syntax to be used in TeXnicCenter?

enter image description here

  • What proof have you that texniccenter can do regex? I don't have it but nothing on the website or in the documentation says something about it. – Ulrike Fischer Aug 11 '15 at 14:34
  • @ Ulrike Fischer: Will the added picture be proof enough for you? ;-) – Robert Aug 11 '15 at 14:40
  • A secret. Well I install the program and tried. The capture seems to be \(...\) and the replacement \1. But imho the implementation is very buggy. Sometimes I got a \1 instead of the capture, and it didn't jump correctly to the next occurrences. – Ulrike Fischer Aug 11 '15 at 14:57
  • @ Ulrike Fischer: Thanks for your hints. As you pointed out, TeXnicCenter RegEx seems to be not very usable. In the future, I'll copy my texts to another editor when I need RegEx. – Robert Aug 12 '15 at 5:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.