Finding placeholders and put then in an array with jQuery -



Finding placeholders and put then in an array with jQuery -

i have next text.

my name ++name++. age ++age++. name of city ++city++ , on.

so want find out instances wrap withing ++ , force them array jquery.

try this:

"my name ++name++. age ++age++. name of city ++city++ , on." .match(/\+\+.*?\+\+/g) .map(function(s){ homecoming s.slice(2, -2); })

jquery

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -