I have a text similar to the text below. It contains a 4
digits number that follows either digit-
or whitespace
and is followed by either .
, ?
, -digit
or whitespace
.
I need to match all of the digits in the first paragraph but none in the second since those digits do not meet my conditions.
Lorem ipsum 3400-digit, sit amet 5000 consectetur adipisicing elit. Natus, explicabo 6700? Itaque iure ipsum laboriosam, ex nemo delectus iste quia cupiditate digit-9134? Iste nam digit-2456 at voluptate est 8456-digit? At excepturi quis voluptatibus 7500.
Lorem ipsum $5000 dolor sit amet consectetur adipisicing elit. Obcaecati tempora dolorum repellat reiciendis cum soluta deserunt ex voluptatibus, nam illum veniam £5550 quidem aperiam sequi, nostrum sed? Quidem eveniet maiores #5550 autem. https://codepen.io/pen/5000/3454
There are a few similar questions already on StackOverflow. I have gone through some of them(links below), but I still can not do this. Please before marking this question as duplicate, check if your solution finds all the occurrence of the 4 digits number in the first paragraph but none in the second paragraph.