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
System Restore Points Not Created on Win 7
BES multiple calendar syncronization
Feildset hide/show in Google Mail, php
obtain source (/usr/src) for 8.0-RELEASE-p3
Error event occuring since bringing up new HubCAS sever
Extract icon from EXE/DLL
Event ID 1030 and 1058 Missing gpt.ini - Group Policy
Require 2 CPUs on an Intel Server SC5520HC Motherboard?
[ODBC Microsoft Access Driver]Invalid descriptor index error
call .rdl with store procedure with parameter