How to extract some unknown text following a known value in a string?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ronn L

    How to extract some unknown text following a known value in a string?

    I have a project where I need to get all text after a specific value until that value is found again.

    Example...

    Source file has the following:

    File found: myfile1.ron
    File found: myfile2.ron

    End:

    Find whatever follows 'File found:' until the next occurance OR when another value such as 'End' is found.
  • code green
    Recognized Expert Top Contributor
    • Mar 2007
    • 1726

    #2
    There are probably a few ways you can do this.
    explode() is one then manipulate as arrays
    Or strtok() which is more confusing (well it confuses me anyway)

    Comment

    Working...