Solved

Regular expression.

Posted on 2007-04-03
2
320 Views
Last Modified: 2012-06-21
[0-9]{6}

YYYYMM
200400
The expression above excepts  200400
We must not let it accept it.
0
Comment
Question by:mathieu_cupryk
  • 2
2 Comments
 
LVL 35

Expert Comment

by:mrichmon
Comment Utility
([12][0-9]{3})(0[1-9]|1[0-2])

which allows the year to start with 1 or 2 followed by 3 digits, then the month syould be 01 upto 09 or 10 through 12
0
 
LVL 35

Accepted Solution

by:
mrichmon earned 500 total points
Comment Utility
Also if you are using a language or parser that returns parenthesized substring matches, you will get the year in the first substring match and the month in the second.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now