J'ai l'URL suivante.Comment obtenir le dernier segment avec une expression régulière?
http://127.0.0.1/ci/index.php/admin/menus/edit/24
Je veux obtenir 24 de ce à utiliser dans jquery/javascript.
Quelque chose comme ça.
var id=this.href.replace(/.*=/,'');
this.id='delete_link_'+id;
Quelqu'un pourrait-il me dire comment le coder?
Voir http://stackoverflow.com/questions/1788908/what-is-the-best-way-to-cut-the-file-name-from-href-attribute -of-an-a-element/1789528 # 1789528 (aussi, ceci est une copie de cette question). –