Find particular range of numbers in the text in column in Excel

Hello for everyone.
I need to find particular range of numbers in the text in column in Excel.
More specifically:
I have strings with text in Excel file. Every strings contains number (which I get it and save like a variable “X”). This number is different every time. My task to find text in the column with particular number (“X”) and text with this number (“X”) and range of numbers ±5.
Example at the screen.
image

So I want to find string “She has 15 cats” (15 - it’s X variable) and all strings what contains same text (“She has “X” cats”) and all numbers between 10 and 20. That is, it must find strings “She has 16 cats” and “She has 20 cats” in Excel too.
I use activity Read Column to get text from Excel, then If activity to compare text in Excel with Text I need. So I find string “She has 15 cats”. But I don’t know how to compare text with range of numbers and find two another strings.
I hope I explained understandably. Thanks for help

You could use a regular expression to do this.

(?<=She has )\d+(?= cats.)

hi @Vicky_Z

[\w\p{Zs}]*(1[0-9]+|20)[\p{Zs}dogs|cats]*