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
Editable dropdown list in ASP.net 3.5 using C#
Extract Objects from Stream
What is the best cms to use with dreamweaver
Where do I need to close/Dispose of my connections, in my code
object required error
Exchange 2010 Send on Behalf for a Distribution Group
Unable to connect Entourage 2004 to SBS 2008 Exchange mailbox
truncate vs delete
Create Access Table Automically
3Com Switch Troubleshooting