From 1c35bd3d9d56b7a17874eb9ffe2cde26061fbe2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=B2=E8=80=98=E2=84=A2?= Date: Tue, 15 Mar 2016 14:10:25 +0800 Subject: [PATCH] refact(regexp): better regexp --- components/button/button.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/button/button.jsx b/components/button/button.jsx index f139d96059..e6db04ff64 100644 --- a/components/button/button.jsx +++ b/components/button/button.jsx @@ -2,7 +2,7 @@ import React from 'react'; import classNames from 'classnames'; import { findDOMNode } from 'react-dom'; -const rxTwoCNChar = /^[\u4e00-\u9fa5]{2,2}$/; +const rxTwoCNChar = /^[\u4e00-\u9fa5]{2}$/; const isTwoCNChar = rxTwoCNChar.test.bind(rxTwoCNChar); function isString(str) { return typeof str === 'string';