Microsoft
Software
Hardware
Network
Question : help me understand regular Expression
Can someone please help me understand what I am doing wrong? I want an expression that validates a number between 1900 and 2099. this the expression I cam up with:
[19|20]+[0-9]{2}
my thinking here is the first two characters can be "19" or "20" then the next two any numeric. but when I test it it seems any combination of number from 0-2 are valid no matter what the length.
Answer : help me understand regular Expression
[19|20] means any character: 1, 9, 2, or 0 -- the vertical bar is redundant. The plus means one or more of the previous, so one or more of 1, 9, 2, or 0. The rest means exactly two numeric digits.
Try the following pattern instead:
1:
(19|20)\d{2}
Random Solutions
Powerpoint 2003 chart labels alignment
MPP microsoft project plan. How can i open a file created in ver 2010 in MPP 2003 or 2007.
Backup jobs in Symantec Backup Exec 11d keep failing (due to lack of free space on destination drive, I believe). How can I fix this? The job logs have been attached
iSCSI Performance Tuning
instance_resources
How to view a .pwi file in XP: Office 2007?
In Excel 2007, remove buttons copied from websites.
Need Macro to Calcuate sum of highlighted cells in Excel
How to generate a heap dump in JBoss
Rebuild SBS 2008 server