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
ADmodify.exe "mailbox rights modification disabled" ??
Repeater Enable/Disable RequiredFieldValidator depending a textbox
"outlook.ost cannot be accessed because it has been configured for usw with a different mailbox"
Java Open Source Barcode Software
How to reset the sametime password for a single user
Password recovery on Juniper SA2500
How do I change the default Domain extension for SBS 2008 in Exchange for all users?
Windows Service crashing on one machine, not on the other
unable to scan with my HP Photosmart All-in-one printer
Thunderbird slow to download