Sign in to follow this  
Followers 0
doestergaard

[SOLVED] Need help with StringRegExpReplace

4 posts in this topic

#1 ·  Posted (edited)

I'm not good at doing regular expressions, as they seem complicated to understand. I have found out how to filter out digits and characters, which is simple enough. However, I need a friendly soul to help me get this:

564c61090a0e2_Skrmbillede_2015-11-18_kl.

What I want, is only the number, and the % sign inside of the brackets [ ]

I will appreciate any help i get. Thanks in advance! :)

Edited by doestergaard

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Try with _StringBetween().

Edited by ahmet

Share this post


Link to post
Share on other sites

Thanks for your reply.

 

I actually find out that i could use it like:

While 1

    If StringInStr($sOutput, "%") > 0 Then

        GUICtrlSetData($oProgress, StringRegExpReplace($sOutput, "\D", ""))
    
    EndIf
    
WEnd

 

Then i can get the progress numbers, and use StringFormat("%u%%", $sOutput) to set the % sign. :) 

Share this post


Link to post
Share on other sites

Glad you solved it.

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