欧阳克2016-11-10 11:26:26
re = /["\[\]]/g '""""[];]pdfaafdsfdsa]ddfd]]'.replace(re, '') //result: ";pdfaafdsfdsaddfd"
三叔2016-11-10 11:26:08
去掉 还是 取到?
也不指明语言
js
'[name="abc"]'.replace(/["\[\]]/, '');
php
$str = '[name="abc"]'; preg_replace('/["\[\]]/', '', $str)