Sign in to follow this  
Followers 0
botanic

String Value after =

5 posts in this topic

#1 ·  Posted (edited)

how can i get the value of the number after the BPM= I know i could use string mid however the number of characters on each side could change as well as the BPM could be less then 100

|Tempo   | BPM=110   | micros\quarter=545454
Edited by botanic

Share this post


Link to post
Share on other sites



I also know i could string split after the BPM= just how do i tell the program that if character 3 is not a number to just use the first 2 characters?

Share this post


Link to post
Share on other sites

Look:

#include <string.au3>
$oRstring="|Tempo    | BPM=110   | micros\quarter=545454"&" "
$String1=_StringBetween($oRstring,"="," ")
$String2=_StringBetween($oRstring,"quarter="," ")
MsgBox(0,"",$String1[0])
MsgBox(0,"",$String2[0])

Note the &" " I added at the end of your string.

Share this post


Link to post
Share on other sites

thanks it works great ^.^

Share this post


Link to post
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
Sign in to follow this  
Followers 0