[Solved] Regular Expressions pattern to extract particular digits from text [closed]
Try this: \b(?:256\d{9}|07[17-9]\d{8})\b Explanation: <!– \b(?:256\d{9}|07[17-9]\d{8})\b Options: ^ and $ match at line breaks; free-spacing Assert position at a word boundary «\b» Match the regular expression below «(?:256\d{9}|07[17-9]\d{8})» Match either the regular expression below (attempting the next alternative only if this one fails) «256\d{9}» Match the characters “256” literally «256» Match a single digit 0..9 … Read more