gcue

stringregexp to extract date from a string

6 posts in this topic

hello world

instead of using stringsplit, i am trying to see if there's a way to use stringregexp to extract date from a string

$string = "12/21/2013 01:32:22 PM"

I would like to keep "12/21/2013"

thanks in advance!

Share this post


Link to post
Share on other sites



 

thanks in advance!

Hey, Thats my style :)

I am trying to learn regexp pattern's from here, Hope it Helps :)


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites

perfect

thank you!

Share this post


Link to post
Share on other sites

or

$string = "12/21/2013 01:32:22 PM"
ConsoleWrite(stringsplit($string,' ',2)[0] & @LF)

Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

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