From: Bhagavatheeswaran Mahadevan Date: 2001-11-26T20:59:38+09:00 Subject: [ruby-talk:26496] Re: String editing question This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C17672.33172A30 Content-Type: text/plain Hi Harry I am Suresh from India.....I have just started using Ruby and also joined this mailing list today...........Could you please tell me where did you get so much info on Ruby.............I have downloaded the book of Pragmatic programmer's guide by Andrew Hunt....but have been struggling to find the info presented in it useful.........could you please help me out? Thanks and regds Suresh > -----Original Message----- > From: HarryO [SMTP:harryo@zipworld.com.au] > Sent: 26 November 2001 17:16 > To: ruby-talk@ruby-lang.org > Subject: [ruby-talk:26495] Re: String editing question > > In article <3C027DEF.218F4875@stud.ntnu.no>, "Kent Dahl" > wrote: > > > HarryO wrote: > >> So, can anyone suggest the right way to approach this? > > > > Not the "right way", but one that I, as a I find myself using > > "pseudo-xml" in lots of posts, prefer, is that recognized legal tags are > > entered as HTML, and all other instances of < and > are replaced with > > < and > > > That was the sort of thing I was getting at if I approached it from > the point of view of the UNacceptable tags. > > > This seems somewhat easier to implement too. You could regexp on any > > occurance of /<.*>/, check if the contents are listed in the "allowed > > tags" list, and gsub the < and > if not. > > If there are many tags in the string, I'd have to do the regexp matching > multiple times. How do I avoid it simply matching the same tags over > and over again (in the case where the regexp matches an acceptable > tag, rather than an unacceptable one)? > > > Of course, this is just of the top of my (quite often faulty) head. > > I'll bet it's not faulty as often as mine !! ------_=_NextPart_001_01C17672.33172A30 Content-Type: text/html Content-Transfer-Encoding: quoted-printable RE: [ruby-talk:26495] Re: String editing question

Hi Harry

I am Suresh from = India.....I have just started using Ruby and also joined this mailing = list today...........Could you please tell me where did you get so much = info on Ruby.............I have downloaded the book of Pragmatic = programmer's guide by Andrew Hunt....but have been struggling to find = the info presented in it useful.........could you please help me = out?

Thanks and = regds
Suresh


------_=_NextPart_001_01C17672.33172A30--