Search code examples
regextextextractregexp-replace

Regex find 8 digit from big text


I have data like this Your LancerPoint ID number is: 10504139 Your LancerPoint username is: dbrooke CA Resident Status: In State Resident I need to extract the ID number 10504139 jut that in regex help

regexr.com/5s2q2


Solution

  • in case you have another set of numbers like a 10 digit number, you could complement Mayank's answer with more specificity.

    /(?<=LancerPoint\sID\snumber\sis:\s)\d{8}(?=\s)/