I am trying to extract the number from a text string that is sent to us by the client. Unfortunately it is part of the note that is typed in by the users and follows no particular pattern.

for example: 14 box 003541903 2whatsup 588(003541903 being the number I am after)

This number does not always have the same number of digits and the leading zeros can be trimmed. The most reliable way of doing this would be probably to extract numbers minimum of 5 digits long (please note that position of the number within the text string differs too)

Yeah, It does need some tweaking, I'm just trying to wrap my head around it now (My OCD kicked in, I'm gonna waste another day staring at it, I know it!). The important thing is that you gave me the code I can work with, I spent good few hours building that frustration - I was about to loose it.