My text is as following and I want to extract the number at the end:
Order number 12345
Confirmation Number 12345
I have used this regex: (?:Order number|Confirmation Number)\s(\d+)
(I am getting this text through outlook email; sometimes it can come Order Number 12345 and sometimes it comes Confirmation Number 12345. Then its ok. But when these both comes togather then this regex extracts same number twice)
Is there a way to extract it once in this case?
I am new to development! Thank you in advance!