<html> <head> <meta charset="UTF-8"/> <title>截取字串长度</title> </head> <body> <script type="text/javascript"> function cutStr(str,len){ var temp=''; ; var pattn=/[^\x00-\xff]/; var strre='';
Java中用正则表达式截取字符串中第一个出现的英文左括号之前的字符串.比如:北京市(海淀区)(朝阳区)(西城区),截取结果为:北京市.正则表达式为() A ".*?(?=\\()" B ".*?(?=\()" C ".*(?=\\()" D ".*(?=\()" http://www.cnblogs.com/xudong-bupt/p/3586889.html 1.什么是正则表达式的贪婪与非贪婪匹配 如:String str=