Click here to Skip to main content
15,877,637 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Update image problem Pin
Abhijit Jana16-Dec-08 18:23
professionalAbhijit Jana16-Dec-08 18:23 
GeneralRe: Update image problem Pin
nour12316-Dec-08 19:29
nour12316-Dec-08 19:29 
QuestionError: "Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine" Pin
coolsatty16-Dec-08 7:12
coolsatty16-Dec-08 7:12 
AnswerRe: Error: "Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine" Pin
Christian Graus16-Dec-08 8:41
protectorChristian Graus16-Dec-08 8:41 
Questionjavascript regular expression Pin
nesfrank16-Dec-08 6:26
nesfrank16-Dec-08 6:26 
AnswerRe: javascript regular expression Pin
Guffa16-Dec-08 6:34
Guffa16-Dec-08 6:34 
GeneralRe: javascript regular expression Pin
nesfrank16-Dec-08 6:37
nesfrank16-Dec-08 6:37 
GeneralRe: javascript regular expression Pin
Guffa16-Dec-08 14:20
Guffa16-Dec-08 14:20 
The string literal actually looks exactly the same.

In the Javascript you need to escape the backslash characters with a backslash character:

var poboxPattern = new RegExp("^(APO|A\\.P\\.O\\.|A P O|FPO|F\\.P\\.O\\.|F P O|POB|P\\.O\\.B\\.|POBOX|P\\.O\\.BOX|PO BOX|P O BOX|P\\.O\\. BOX|POST OFFICE)");

In C#:

RegEx postboxExpression = new RegEx("^(APO|A\\.P\\.O\\.|A P O|FPO|F\\.P\\.O\\.|F P O|POB|P\\.O\\.B\\.|POBOX|P\\.O\\.BOX|PO BOX|P O BOX|P\\.O\\. BOX|POST OFFICE)");

However, in C# you can also use a @ delimited string so that you don't need to escape the backslashes:

RegEx postboxExpression = new RegEx(@"^(APO|A\.P\.O\.|A P O|FPO|F\.P\.O\.|F P O|POB|P\.O\.B\.|POBOX|P\.O\.BOX|PO BOX|P O BOX|P\.O\. BOX|POST OFFICE)");

Despite everything, the person most likely to be fooling you next is yourself.

Questionpopulating a gridview in a Page_Load method Pin
laziale16-Dec-08 4:04
laziale16-Dec-08 4:04 
AnswerRe: populating a gridview in a Page_Load method Pin
Paddy Boyd16-Dec-08 4:24
Paddy Boyd16-Dec-08 4:24 
GeneralRe: populating a gridview in a Page_Load method Pin
laziale16-Dec-08 5:22
laziale16-Dec-08 5:22 
GeneralRe: populating a gridview in a Page_Load method Pin
Venkat Eswaran16-Dec-08 8:24
Venkat Eswaran16-Dec-08 8:24 
AnswerRe: populating a gridview in a Page_Load method Pin
Christian Graus16-Dec-08 9:57
protectorChristian Graus16-Dec-08 9:57 
QuestionCreat User Pin
alirezajo0n16-Dec-08 2:34
alirezajo0n16-Dec-08 2:34 
AnswerRe: Creat User Pin
Abhijit Jana16-Dec-08 2:40
professionalAbhijit Jana16-Dec-08 2:40 
AnswerRe: Creat User Pin
Brij16-Dec-08 2:43
mentorBrij16-Dec-08 2:43 
AnswerRe: Creat User Pin
Paddy Boyd16-Dec-08 2:44
Paddy Boyd16-Dec-08 2:44 
QuestionChange BG color on Client side and store it till browser close. Pin
vkumar0916-Dec-08 1:53
vkumar0916-Dec-08 1:53 
AnswerRe: Change BG color on Client side and store it till browser close. Pin
Abhijit Jana16-Dec-08 2:18
professionalAbhijit Jana16-Dec-08 2:18 
GeneralRe: Change BG color on Client side and store it till browser close. Pin
vkumar0916-Dec-08 17:50
vkumar0916-Dec-08 17:50 
AnswerRe: Change BG color on Client side and store it till browser close. Pin
Brij16-Dec-08 2:45
mentorBrij16-Dec-08 2:45 
AnswerRe: Change BG color on Client side and store it till browser close. Pin
Dominic Goulet16-Dec-08 3:07
Dominic Goulet16-Dec-08 3:07 
GeneralRe: Change BG color on Client side and store it till browser close. Pin
vkumar0916-Dec-08 17:45
vkumar0916-Dec-08 17:45 
GeneralRe: Change BG color on Client side and store it till browser close. Pin
Dominic Goulet17-Dec-08 0:02
Dominic Goulet17-Dec-08 0:02 
QuestionWeb Service to Send Mail Pin
saurabh mohal16-Dec-08 1:52
saurabh mohal16-Dec-08 1:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.