Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

StringRegExp: extract Date from Pathname

$
0
0

Hi everybody,
 
I'd like to extract the Date (Folder Name) from a path that is saved as Local Constant:

Local $Date=0 Local Const $metaPath= @ScriptDir & "\warra\2015\150128\procEagle\rad\EA_warra_test.meta" ;Local Const $Date= "20" & StringRegExp($metaPath, '([:digit:]{6})', 1) $Date= StringRegExp($metaPath, '(?:\)(\d{6})(?:\)', 0)

I want to get the 150128, to send it  to a text file later

Send("Time:{ENTER}Date{TAB}" & $Date & "^s")

But no matter what I try, I get no matches (output '0' or nothing at all). Other operations are able to work with $metaPath.

Where is my error?
 
Thanks for replies.


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>