JavaScript Optimize given regular expression in javascript

Following regex replaces " >" or " > " or "> " character with "/".

tempKeyword = tempKeyword.replace(/( > )|( >)|(> )/g,'/');

How can I make this better?

Thanks!

Answer:1

I want to catch all key presses on my webpage so that when you start typing the text appears in the search box (input) and this box gets focus. Can someone provide me some hints?

I want to catch all key presses on my webpage so that when you start typing the text appears in the search box (input) and this box gets focus. Can someone provide me some hints?

I have two classes in jquery e.g: function a(){ this.init = function(a){} } function b(){ this.init = function(a){} } Both the classes have this.init() method.I have a situation that i have the ...

I have two classes in jquery e.g: function a(){ this.init = function(a){} } function b(){ this.init = function(a){} } Both the classes have this.init() method.I have a situation that i have the ...

  1. get object name jquery
  2. object class name jquery
  3. json object name jquery
  4. jquery object name variable
  5. find object by name jquery
  6. jquery object name to string
  7. select object by name jquery
  8. get object key name jquery
  9. get object property name jquery
  10. get object class name jquery
  11. jquery object name convention
  12. jquery object name value
  13. jquery object name 取得

I have a problem with JavaScript callback functions. I'm using node Js and node-mysql to process mysql queries. When new users registered i need to do 2 db checks if This email already registered and ...

I have a problem with JavaScript callback functions. I'm using node Js and node-mysql to process mysql queries. When new users registered i need to do 2 db checks if This email already registered and ...

  1. javascript process function

According to this link by mozilla, the data- attribute is used for setting data in the DOM. I want to grab the time using new Date().getTime() and append it to an element in the DOM. What is the ...

According to this link by mozilla, the data- attribute is used for setting data in the DOM. I want to grab the time using new Date().getTime() and append it to an element in the DOM. What is the ...