7 Replies Latest reply: Nov 18, 2015 9:23 AM by Gysbert Wassenaar RSS

    Extract a six digit number from a string that also contains other numbers

    Ben Robinson

      Hi All,


      I need some assistance from some experts out there!


      I have a string field that contains a job number and I need to extract the job number.


      Unfortunately there are other numbers in the string which complicates things.


      Example strings that I am working with are below:


      Microsoft Word - 316680_15196160415_CQP Stage 3_bes               - I need to extract 316680 from this string


      12275 151028 Stage 1 2 Post Construction Audit                              - I need to extract 151028 from this string

      So basically any 6 digit string needs to be extracted.

      Does anyone have any ideas as to how I can do this (in the script)?

      Many thanks