问问题
634 次
3 回答
2
于 2012-10-19T23:02:43.430 回答
1
只要您通过charset
属性或Content-Type
标题正确标记 JavaScript(或它的保存页面,如果它是内联的)的编码,您就可以使用任何在正则表达式中没有特殊含义的字符,只需在此处按字面输入即可:
/’/
于 2012-10-19T23:43:39.933 回答
0
Alternative of ’
or ’
in regex in most of environments is
\u2019
however in Perl and PCRE \u
is not supported , but \x
syntax instead
\x2019
as 2019
is hex of decimal 8217
.
Regarding unicode with regex in Javascript read: Javascript + Unicode regexes
于 2012-10-19T22:59:18.733 回答