Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Feb 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    get numbers from string following specific character sequence

    hi all. This seems like a good place to find a solution to my problem.

    I'm trying to extract 2 sets of numbers from a string (a file name) following specific words within that string. For example I would like to extract the numbers 149 and 3614 following the expressions "jobno_" and "certificate_" from the following string 'jobno_149_certificate_3614_Grandpas_Florist.pdf'

    Now I realize I can search for regular expression in a substring by specifying character numbers in the string but i need something a little more dynamic than that as the respective numbers following "jobno_" and "certificate_" will grow in time hence the need to find those words and output the numbers which directly follow them. The problem is that I'm a bit of a php noob and am not sure how to approach this. Any ideas?

  • #2
    New to the CF scene
    Join Date
    Feb 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok. Found a solution to the problem.
    http://www.bitrepository.com/how-to-...-a-string.html


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •