Jump to content

Returning characters in a string


Recommended Posts

something along this line

$string = "this is a test (this is only a test), and only another test"
$start = StringInStr($string,"(") + 1
$end = StringInStr($string,")")
$result = StringMid($string, $start , $end - $start)
MsgBox(0,"Result",$result)
Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

something along this line

$string = "this is a test (this is only a test), and only another test"
$start = StringInStr($string,"(") + 1
$end = StringInStr($string,")")
$result = StringMid($string, $start , $end - $start)

<{POST_SNAPBACK}>

I must have looked through the String function list a dozen times and missed that

StringInStr :(:( - Many thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...