Title: regular expression problem for IE
Last modified: August 18, 2016

---

# regular expression problem for IE

 *  [geoffe](https://wordpress.org/support/users/geoffe/)
 * (@geoffe)
 * [20 years ago](https://wordpress.org/support/topic/regular-expression-problem-for-ie/)
 * This happens only in Internet Explorer but the javascript function sendToEditor()
   in inline-uploading.php doesn’t execute well in IE, while FF processes it fine.
 * For example, this command
    ` h = h.replace(new RegExp(' (class|title|width|height
   |id|onclick|onmousedown)=([^\'"][^ ]*)( |/|>)', 'g'), ' $1="$2"$3'); // Enclose
   attribs in quotes  will replace <div id=photoinlayer><img src=file.jpg … as <
   div id=”photoinlayer”><img src=”file.jpg” … in Firefox but IE will produce <div
   id=”photoinlayer><img” src=”file.jpg…
 * So it appears that the conditions ([^\'”][^ ]*)( |/|>) aren’t working properly
   in IE.
 * Any ideas why?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [geoffe](https://wordpress.org/support/users/geoffe/)
 * (@geoffe)
 * [20 years ago](https://wordpress.org/support/topic/regular-expression-problem-for-ie/#post-392693)
 * can anyone tell me what this translates to in the search: [^\'”][^ ]*
 * I’m reading [this](http://www.regular-expressions.info/repeat.html) but not getting
   it.
 * edit: I’ve figured out that the above set means any character that is not ‘ or”
   followed by any character that is not a space. Any chance IE doesn’t understand
   that? Or a tip on where I can find help on this?
 * edit2: using ([^\'”][^ ]+?) seems to fix the problem for IE.
 * Can anyone tell me if this is a valid solution, or why it should or shouldn’t
   be used?
 *  Thread Starter [geoffe](https://wordpress.org/support/users/geoffe/)
 * (@geoffe)
 * [20 years ago](https://wordpress.org/support/topic/regular-expression-problem-for-ie/#post-392772)
 * That fixed the trouble, although I had to separate the search for id and add 
   it as a second replace.
 * I still can’t figure out how to get
    ` h = h.replace(new RegExp('<(/?)A', 'g'),'
   <$1a'); // Lowercase tagnames`
 * to work in IE.
 *  Thread Starter [geoffe](https://wordpress.org/support/users/geoffe/)
 * (@geoffe)
 * [20 years ago](https://wordpress.org/support/topic/regular-expression-problem-for-ie/#post-392774)
 * I’ve also found [a place for help with Regex](http://regexadvice.com/forums/18025/ShowThread.aspx#18025)
   on this topic. Hopefully some solution will come of this.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘regular expression problem for IE’ is closed to new replies.

## Tags

 * [inline-uploading.php](https://wordpress.org/support/topic-tag/inline-uploading-php/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [regex](https://wordpress.org/support/topic-tag/regex/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 1 participant
 * Last reply from: [geoffe](https://wordpress.org/support/users/geoffe/)
 * Last activity: [20 years ago](https://wordpress.org/support/topic/regular-expression-problem-for-ie/#post-392774)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
