- private var isbnReg:RegExp = /^(?=.{13}$)\\d{1,5}([- ])\\d{1,7}\\1\\d{1,6}\\1(\\d|X)$/;
- private function testISBN():void {
- var s:String ="ISBN 1-56389-016-X";
- trace(s.match(isbnReg));
- }
- //该片段来自于http://www.codesnippet.cn/detail/15112012373.html
来源: http://www.codesnippet.cn/detail/15112012373.html