Jump to content

Combine StringReplace & StringRight


Recommended Posts

Hey im trying to combine both the functions but i aint get the value i need.

 

this is how i try it

#include <MsgBoxConstants.au3>

#include <StringConstants.au3>

Local $bString = StringStripWS(ClipGet(), $STR_STRIPLEADING + $STR_STRIPTRAILING + $STR_STRIPSPACES)

Local $sString = Stringright($bString,2) ; Retrieve 5 characters from the left of the string.
MsgBox($MB_SYSTEMMODAL, "", "The 5 leftmost characters are: " & $sString)

 

value in getclip is "monsteri-12345  "

to replace first the spaces and then only show the last 6 values.

 

can you please help me?

other thought is to just replace all the letters and - and just show the numbers. the numbers are what i need.

 

 

 

 

 

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...