Use a "positive lookbehind":
What you need is a Positive Look-Behind: (?<=CHAPTER )\d+
Note that the space before the number is included in the look-behind.
Ariel types faster than me.
Note, though, that \K will only work with CS6 and up...
I've noted, Ariel!
Not only a Positive Lookbehind perhaps. There could be some pitfalls. But since we do not know the actual contents of the text it's hard to suggest something more. Take the following sentences, that I made up:
Case one is ok.
Case two not so, because the word "CHAPTER" is written in lower case and formatted in upper case.
Case three could get some help with the second number.
Also one could ask, if the horizontal white space between the "R" and the number is always a simple "blank".
Maybe we could better write:
(?<=CHAPTER\h)\d+ == CHAPTER\h\K\d+
To really be more relevant:
(?!~j) is what I call a "backdoor"!
By default, it's equal here to: CHAPTER\h\K\d+
But if we don't want to catch "Chapter 7" in "Chapter 7 or 12", I'll insert a non-joiner after "7"!
… But you're right! without really knowing what the op really wants, we can play for a long time!!
Just a comment!
For me, (?<=CHAPTER )\d+ is not a real good answer!
For 2 reasons:
1/ it means that the op uses a simple blank after CHAPTER instead of a logical indivisible space.
This will soon lead to results somewhat risky at line ends in his layout (and in the future)!
2/ It will take occurrences as:
"WE GAVE YOU IN THIS CHAPTER 2 EXPLANATIONS THAT SEEM TO US [Uwe and me] MORE RELEVANT!"
Without defining an indivisible space after or before "2", with this solution, "CHAPTER 2" will be taken.
The problem is that, here, "2" concerns "ways"! Of course, if I had written:
"WE GAVE YOU IN THIS CHAPTER TWO EXPLANATIONS THAT SEEM TO US [Uwe and me] MORE RELEVANT!"
… there would have been less hesitation! (not really sure!)
Now, you can mark this answer as correct! I've done my explanation job!