Question: I'm trying to remove all from a string.

```
runReportReq.responseText.replace(/\<style>.*?\</style>/, '')

```

Can anyone show me where I'm going wrong?

Answer: 
Try this:

```
runReportReq.responseText.replace(/<style>.*?<\/style>/g, '')

```

You can test the validity of the regex syntax here for JavaScript with sample code:  

[Regex Tester](http://www.gethifi.com/tools/regex) 

You can test the regex itself with sample input here for JavaScript:  

[RegexPal](http://regexpal.com/)
replace returns the processed string, so you have to store the result anywhere

see <http://www.w3schools.com/jsref/jsref_replace.asp>