For regexs, I've found this site to be pretty helpful: http://regexlib.com/default.aspx
I can usually find a related expression and then get mine working using what I see there. hth, matt horn flex docs > -----Original Message----- > From: [email protected] > [mailto:[EMAIL PROTECTED] On Behalf Of e_baggg > Sent: Thursday, December 21, 2006 2:57 PM > To: [email protected] > Subject: [flexcoders] Re: RegExp > > Parker, > Thanks, but that did not do the trick. It still returned the > full HTML. yes, you are right though...that first back slash > was not needed. Hmm, back to the drawing board I guess. It > stinks, I found a regular expression that does what I need > but it does not compile in AS3. I'll keep hammering the books > and tutorials to try and figure this out. newbies to regex > and deadlines don't mix well. > > --- In [email protected] > <mailto:flexcoders%40yahoogroups.com> , "parkerwhirlow" > <[EMAIL PROTECTED]> wrote: > > > > a couple quick things.. I'm by no means an expert at regex... but... > > > > the first backslash is unnecessary isn't it? & is not a meta > > character, so the \ after the first / isn't needed. also, don't you > > want to remove ALL characters between the < and > ? so I'd > change the > > inner [a-zA-Z0-9]* to .*? (the question mark makes it a lazy > > quantifier instead of an agressive quantifier) > > > > And one last thing, is you may need the multi-line flag > also (if the > > XML has line breaks... so I'd give this a shot... haven't tried it > > myself though.... > > > > /<.*?>/gim > > > > good luck > > PW > > > > --- In [email protected] > <mailto:flexcoders%40yahoogroups.com> , "e_baggg" <e_baggg@> wrote: > > > > > > I am trying to create a regular expression that > essentially parses > > > out all the html of a text string. (i.e. - Remove all > text between "<" > > > and ">"). I am not the seasoned regex pro, but my > attempts have > > > failed based on research within the livedocs: > > > > > > var pattern : RegExp = /\<[a-zA-Z0-9]*>/gi > > > > > > Does anyone see what is wrong? > > > > > > var stringToEdit : String = "<!DOCTYPE html PUBLIC > '-//W3C//DTD > > > HTML 4.01 > Transitional//EN'><html><head>text I should > > > see</head></html>"; > > > > > > var pattern : RegExp = /\<[a-zA-Z0-9]*>/gi var > newStr : String > > > = stringToEdit.replace(pattern, ""); trace(newStr); > > > > > > //Desired Output: > > > text I should see > > > > > > //Actual output :-( > > > <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 > > > Transitional//EN"><html><head>text I should see</head></html> > > > > > > > > > >

