ugakebet 4 Posted March 12, 2011 Report Share Posted March 12, 2011 I need to select the day from the current date.Right now I have (see pic).. but it does not work. How can I use regex to get the dd part from mm/dd/yyyy Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted March 12, 2011 Report Share Posted March 12, 2011 Hi try to replace it with this \b\w{2}/\w{2}/\w{4}\b Quote Link to post Share on other sites
ugakebet 4 Posted March 12, 2011 Author Report Share Posted March 12, 2011 Hi try to replace it with this \b\w{2}/\w{2}/\w{4}\b Hey, nope it does not work... It simply copies the whole mm/dd/yyyy not the dd portion Quote Link to post Share on other sites
Gogetta 263 Posted March 12, 2011 Report Share Posted March 12, 2011 Another way you can do this by adding to a list from text and using the slash as the delimiter. Then all you would need to do is use list item position 1. http://i.imgur.com/FTbFk.jpg Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted March 12, 2011 Report Share Posted March 12, 2011 Oh I see you want the day only. Try this dateonly.ubot Quote Link to post Share on other sites
ugakebet 4 Posted March 13, 2011 Author Report Share Posted March 13, 2011 Another way you can do this by adding to a list from text and using the slash as the delimiter. Then all you would need to do is use list item position 1. http://i.imgur.com/FTbFk.jpg Oh I see you want the day only. Try this dateonly.ubot thanks guys, both the above should definitely work. But i just find it surprising that regex itself cannot separate the month day or year from a dd/mm/yyyy format. feel for the guys that dont use ubot and simply want to get the month through regex Quote Link to post Share on other sites
JohnB 255 Posted March 13, 2011 Report Share Posted March 13, 2011 Regex has a search and replace method. If you search the internet you will find a ton of info on it. John Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.