Sign in to follow this  
Followers 0
CodeTinkerer

Extract Only Numbers and Symbols

6 posts in this topic

Hi again!,

How would I go about Extracting only the numbers and the colon for time from "AVAIL:13:20" ?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Should do the job

$aArray = StringRegExp("AVAIL:13:20","(\d{1,2}:\d{2})",3)
consoleWrite($aArray[0]&@lf)
Edited by Kyan

Heroes, there is no such thing

One day I'll discover what IE.au3 has of special for so many users using it.
C'mon there's InetRead and WinHTTP, way better
happy.png

Share this post


Link to post
Share on other sites

msgbox(0, '' , StringRegExp("AVAIL:13:20","\D*(.*)",3)[0])


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

Share this post


Link to post
Share on other sites

Amazing, thanks everyone!!

Share this post


Link to post
Share on other sites

Hi, an other one...

$split=stringsplit("AVAIL:13:20",":",2)
Msgbox(0,0,$split[1]&":"&$split[2])

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