Naveen_Naveen

Stringmid Between Quotes

5 posts in this topic

#1 ·  Posted

Hola autoit Users.

 

I am coming back here since i am in need of help once again.

i have a file which has the release number of that particular version.

Using stringmid, I am able to retrieve the version number but I always retrive only 5 characters from the 25th position.

 

But the release number is enclosed within quotes. What would be ideal is to navigate to the line (which i have done) and then take the string that is within the quotes .

 

Is this in anyway possible  ??

 

 

Regards,

Naveen_NaveeN

Share this post


Link to post
Share on other sites



#2 ·  Posted

This could work

$res = StringRegExpReplace($txt, '(?s).*?"([^"]+).*', "$1")

If not you might post the file

Share this post


Link to post
Share on other sites

#3 ·  Posted

if its the only thing in double quotes on the line, this may succeed:

$str= 'This line has a version number "9.51.6.1a" and it is in those quotes'


msgbox(0 , "" , stringmid($str , StringInStr($str , '"' , 1) + 1 , (StringInStr($str , '"' , 0 , -1) - 1) - StringInStr($str , '"' , 0 , 1)))

 


,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

#4 ·  Posted

7 minutes ago, iamtheky said:

this may succeed

I was sure that this was about to come   :P:)

 

1 person likes this

Share this post


Link to post
Share on other sites

#5 ·  Posted

This is awesome !!!!! just what i wanted !!! you guys are just amazing

 

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