Hi Guys.
I am looking for a little advice on how I can do something. Please give me your suggestions.
Pretend I have some string values like this:
Document1_789123456.docx
3rd_Notice_123456789_Final.pdf
001002003_SallySample_Upload.xls
I know I can use RegEx to find out if the strings have a nine digit employee number in the string. But I also want to get the 9 digit employee number from the file.
How would you recommend I get the 9 digit employee number? Its important that I get all 9 digits. If the number if 8 digits long, then its not the employee number.
Since RegEx only tells me if the value exists (and not where in the string it exists), I was thinking maybe I could loop through the string and count how many numbers in a row I find.
What do you think? Is there a better way?
I am looking for a little advice on how I can do something. Please give me your suggestions.
Pretend I have some string values like this:
Document1_789123456.docx
3rd_Notice_123456789_Final.pdf
001002003_SallySample_Upload.xls
I know I can use RegEx to find out if the strings have a nine digit employee number in the string. But I also want to get the 9 digit employee number from the file.
How would you recommend I get the 9 digit employee number? Its important that I get all 9 digits. If the number if 8 digits long, then its not the employee number.
Since RegEx only tells me if the value exists (and not where in the string it exists), I was thinking maybe I could loop through the string and count how many numbers in a row I find.
What do you think? Is there a better way?