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
Apache - Tomcat TCP Connection problem - CLOSE_WAIT / FIN_WAIT_2
Crystal Reports Xi - Sorting a CrossTab Report by a Summary Field
SSG5 VPN Routing, internal LAN route works, VPN route doesnt.
Adding a password to a folder
wireless router question
Continue to next part of script w/o having to close command prompt window
VB.NET - System.UnauthorizedAccessE
xception was unhandled
Email an attachment in C# Windows application
Add comments to PDF
Write compressed bmp file