My folder name is " abggdv 5-24-19 ftydfty"
here i want to get only date in the folder name
please help me out to find solution
My folder name is " abggdv 5-24-19 ftydfty"
here i want to get only date in the folder name
please help me out to find solution
Hi, @brindhaS,
Store the folder name in the string variable like strName.
and use strName.split(" "c)(1).You will get only date.
If you find this useful mark it as solution.
Cheersβ¦
Hi,
to extract a date format as above you can use Regex
β\d{1,2}-\d{2}-\d{2}β
This will give you any date format with 2 digits follow by a - e.g. 01-05-19 or 11-05-19 or 5-25-19
if the date is single digit like 2 (5-2-19) it not get selecting
As @TimK mentioned i have just changed little bit in that regex. Try below regex once.
β\d{1,2}-\d{1,2}-\d{2}β
As @Manjuts90 has amended, he has changed the second part to look for either 1 or 2 digits by changing {2} to {1,2}
Thanks
Did you check mine @brindhaS
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.