Click here to Skip to main content
15,915,019 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: Insert a standar control to a ASP.NET Web application Pin
Abhijit Jana27-Nov-08 4:24
professionalAbhijit Jana27-Nov-08 4:24 
AnswerRe: Insert a standar control to a ASP.NET Web application Pin
Dominic Goulet1-Dec-08 1:51
Dominic Goulet1-Dec-08 1:51 
QuestionWhat can I use to record/playback/logging of webpage test? Pin
WebLearner25-Nov-08 5:37
WebLearner25-Nov-08 5:37 
GeneralLayout for this forum Pin
georgewu123425-Nov-08 4:09
georgewu123425-Nov-08 4:09 
GeneralRe: Layout for this forum [modified] Pin
NeverHeardOfMe25-Nov-08 5:36
NeverHeardOfMe25-Nov-08 5:36 
QuestionRegex headache.. Pin
markymark8225-Nov-08 3:31
markymark8225-Nov-08 3:31 
AnswerRe: Regex headache.. Pin
NeverHeardOfMe25-Nov-08 5:33
NeverHeardOfMe25-Nov-08 5:33 
GeneralRe: Regex headache.. Pin
markymark8225-Nov-08 5:46
markymark8225-Nov-08 5:46 
Well...

It's my boss who isn't letting me put linebreaks etc in the db, so I don't have any leeway there...

I did have a good try at string.replace() but got a bit confused with first instances of etc. and so thought maybe a regex may be a bit cleaner.

I have litterally just come up with a simple solution, though it isn't ideal, it does work.

I'm using this now...

string regex1 = "\\A+"; //matches begining of string
string regex2 = "(\u2026)"; //matches … char
string regex3 = "(\\s+)"; //matches a space char
string regex4 = @"( <br /> )"; // matches <br />

OfferDescriptionStr = Regex.Replace(OfferDescriptionStr, regex2 + regex3, "\u2026<br />", RegexOptions.IgnoreCase);
OfferDescriptionStr = Regex.Replace(OfferDescriptionStr, regex1 + regex2 + regex4, "\u2026 ", RegexOptions.IgnoreCase);


Basically, as you can see, I gave up looking for 'Not the begining of a string', replcaed all instances of "… " with "…<br />", then...

looked for the begining of the string and replaced "…<br />" with "… " as it was originally.

A Bit messy but it works a treat now.

Thanks for the response, if time allows (though I doubt it), I might well try again on the string.replace(). Maybe at the start of the day before I get too bogged down in it again..


Cheers

Mark
QuestionI have a problem with thumbnails and cms image changing... Pin
FeRtoll25-Nov-08 3:27
FeRtoll25-Nov-08 3:27 
AnswerRe: I have a problem with thumbnails and cms image changing... Pin
Ashfield26-Nov-08 0:44
Ashfield26-Nov-08 0:44 
QuestionCross-browser compatibility with ASP.NET 3.x? Pin
emunews25-Nov-08 2:47
emunews25-Nov-08 2:47 
AnswerRe: Cross-browser compatibility with ASP.NET 3.x? Pin
Shyam Bharath26-Nov-08 1:48
Shyam Bharath26-Nov-08 1:48 
GeneralRe: Cross-browser compatibility with ASP.NET 3.x? Pin
emunews26-Nov-08 4:21
emunews26-Nov-08 4:21 
GeneralRe: Cross-browser compatibility with ASP.NET 3.x? Pin
Dominic Goulet1-Dec-08 1:54
Dominic Goulet1-Dec-08 1:54 
QuestionIs It Posible to write "Page.PreviousPage.PreviousPage.FindControl()" Pin
Ambi4you24-Nov-08 20:07
Ambi4you24-Nov-08 20:07 
AnswerRe: Is It Posible to write "Page.PreviousPage.PreviousPage.FindControl()" Pin
Paddy Boyd25-Nov-08 5:17
Paddy Boyd25-Nov-08 5:17 
GeneralRe: Is It Posible to write "Page.PreviousPage.PreviousPage.FindControl()" Pin
Ambi4you25-Nov-08 19:45
Ambi4you25-Nov-08 19:45 
QuestionLoose Coupled Architecture Pin
altctrlnick24-Nov-08 5:39
altctrlnick24-Nov-08 5:39 
Questionaccess a user registry through a web browser Pin
Haim Nachum24-Nov-08 2:04
Haim Nachum24-Nov-08 2:04 
AnswerRe: access a user registry through a web browser Pin
Johnny ²24-Nov-08 2:13
Johnny ²24-Nov-08 2:13 
GeneralRe: access a user registry through a web browser Pin
Haim Nachum24-Nov-08 3:08
Haim Nachum24-Nov-08 3:08 
GeneralCross post Pin
led mike24-Nov-08 5:38
led mike24-Nov-08 5:38 
QuestionIE8 Rendering problem (my bug or theirs?) Pin
stevio24-Nov-08 1:22
stevio24-Nov-08 1:22 
AnswerRe: IE8 Rendering problem (my bug or theirs?) Pin
stevio25-Nov-08 13:15
stevio25-Nov-08 13:15 
QuestionReturning XMLDocument from Service Pin
Nagraj Naik24-Nov-08 0:29
Nagraj Naik24-Nov-08 0:29 

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.