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
Post a Comment