Microsoft
Software
Hardware
Network
Question : Error in Regex expression...
What's wrong with the one line of code below? The field contains a number, possibly followed by non-numeric characters. I am trying to eliminate everything except the first numeric characters.
Visual Studio IDE says I have "invalid arguments". What am I doing wrong?
1:
NbrOfPages = Regex.Replace(NbrOfPages,@"^\d+");
Answer : Error in Regex expression...
yes it should do but what you are trying to exactly do with your regex?
are you trying to remove everything from the string except the digits?
if so then try this:
NbrOfPages = Regex.Replace(NbrOfPages, @"[^\d]", "");
Random Solutions
Which unit test tool contained in Visual Studio 2008?
IPv4 vs IPv6
Network connection intermittently blocks a port Error 619
Convert C# to VB
Proliant ML110 G4 Lost RAID and Randomly gives Error 0251
MS-Access doesn't recognize all rows in text file ...
Current Logged In User
average value of a function
Localized Date format
JavaScript: Alert when checkbox value changed