Hello,
I've been trying to teach myself some basic regex to help me with tweaking my epubs via sigil. I managed to sort out most of the stuff on my own, but have run into some trouble with the following...
Trying to change "CHAPTER TWENTY-TWO" to "Chapter Twenty-Two"
I can pick up the Uppercase using as my test case...The FIND field..
Code:
>CHAPTER ([A-Z])([A-Z]+)-([A-Z])([A-Z]+)<
but my replace field fails. I'm using...
Code:
>Chapter \1\L\2-\3\L\4<
The thing is that I thought this should give me the result I'm after but instead I get "Chapter Twenty-two" - the second number being lower case. What am I doing wrong?
Also, can I add regex to pick up "CHAPTER ONE" and also the double (or triple) digit numbers like "CHAPTER TWENTY-TWO" all in the same regex?
What should be in the "Replace Field" to work?
Much appreciated.