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], "e_baggg" <[EMAIL PROTECTED]> 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> >

