+ 1
How to check date format for string
Hello I have an input string which I want to verify whether it has specific format or not... Like dd-mm-yy or dd-mmm-yy One way which is very trivial is to check out for index of - and then ensure that portion left out is following date , month and year range.... Is there any standard way of checking this out rather than doing on our own by manipulating string operation.... Unfortunately , I have code where I can't use boost or other third party code.. only c++ functionality is allowed to be used... Any pointers would be of great help...
2 Antworten
+ 3
you could try regex
0
This came to my mind while implementation but I heard some where that regex is something which is too slow and one should not opt for it..