- 浏览: 321749 次
-
文章分类
- 全部博客 (116)
- Oracle (29)
- MySQL (2)
- Java (20)
- .NET (2)
- Javascript (4)
- Spring (6)
- Struts (6)
- Hibernate (16)
- JSP (6)
- Tomcat (1)
- Quartz (2)
- RCS (1)
- Translate (12)
- PL/SQL (5)
- Sqlplus (1)
- System (6)
- Linux (11)
- Ubuntu (9)
- Windows (10)
- Mac (2)
- Tools (8)
- Mercurial (1)
- Google Code (1)
- Subversion (1)
- Debian (2)
- Freemarker (6)
- Web (2)
- PHP (1)
- Nginx (1)
最新评论
-
sunday1207:
private Class getParameterizedT ...
java 中 BaseDao 在Hibernate中的用法 -
SkimSkim:
你这里的解压是把文件夹11下面的所有文件都放在ins这个文件夹 ...
ubuntu 在终端使用 sqlplus 连接远程数据库 -
as619864232:
漫步邃思 写道其实常用的就那么几个命令,大部分都用不到的是啊, ...
windows cmd 命令 -
漫步邃思:
其实常用的就那么几个命令,大部分都用不到的
windows cmd 命令
java.util.regex
Class Pattern
java.lang.Object java.util.regex.Pattern
public final class Pattern
A compiled(编辑) representation(描述) of a regular expression(正则表达式).
A regular expression(正则表达式), specified as a string, must first be compiled(编译) into an
instance of this class. The resulting(致使) pattern can then be used to create a Matcher
object
that can match arbitrary(任意) character
sequences against(违反) the regular expression(正则表达式). All of the state
involved(涉及) in performing(执行) a match(匹配) resides(存在) in the matcher, so many matchers can
share the same pattern.
A typical(典型的) invocation(调用) sequence is thus
Pattern p = Pattern.compile
("a*b"); Matcher m = p.matcher
("aaaaab"); boolean b = m.matches
();
A matches
method is defined by this class as a convenience(方便) for when a regular expression
is used just once. This method compiles(编译) an expression and matches an input
sequence against(靠) it in a single invocation. The statement
boolean b = Pattern.matches("a*b", "aaaaab");
is equivalent(相等的) to the three statements above, though for repeated(重复) matches it is less efficient since it does not allow the compiled(编译) pattern to be reused(再用).
Instances of this class are immutable and are safe for use by multiple
concurrent threads. Instances of the Matcher
class
are not safe for such use.
发表评论
-
JDK 对应数字版本号
2013-08-01 17:22 1310J2SE 7 = 51 (0x33 hex),J2SE 6.0 ... -
error 和 exception 之间的区别
2012-10-13 09:21 1053很多程序员不清楚error和exception之间的区别,这区 ... -
使用 Java 遍历二叉树
2012-10-03 20:09 1288在计算机科学中,二叉树是每个节点最多有两个子树的树结构 ... -
Spring 中事务的传播性
2012-09-17 20:46 930在 Spring 中一共定义了 ... -
J2EE 全面简介
2012-07-19 13:04 888刘湛 (jeru@163.net), 武汉 ... -
OpenSessionInViewFilter 的一些了解
2012-07-16 20:55 987Spring 中的 OpenSessionInViewFil ... -
设计模式
2012-07-16 17:42 997《设计模式》一书原先把设计模式分为创建型模式、结构型模式、行为 ... -
ServletContext 以及 ServletConfig 和 ServletContextListener 的一些理解
2012-07-15 00:12 1491当 Servlet 容器启动的时候,会读取 web.xml 中 ... -
Quartz 中的一些细节
2012-07-12 19:10 850JobDetail 中有一个 JobDataMap,而 Tri ... -
Hibernate 注册方言以及时间精度
2012-07-12 19:09 1242Oracle 10G 的 JDBC 驱动在 JAVA 中 ... -
Quartz Cron 表达式支持到七个域及实例
2012-07-12 19:07 1664名称 是否必须 允许值 特殊字符 秒 ... -
在 Linux 下安装 JDK 和设置 JAVA 环境变量
2012-07-08 16:16 1763I know lot of you starting o ... -
java 中 BaseDao 在Hibernate中的用法
2012-07-02 17:41 3247import java.lang.reflect. ... -
Struts2 中 default.properties 的解释
2012-05-19 13:30 1897### Struts default properties ... -
Struts2 中 web.xml 的翻译
2012-05-19 13:01 1127The web.xml web application ... -
hibernate 中 SQLFunctionTemplate 类的翻译
2012-05-13 13:34 1868org.hibernate.dialect.funct ... -
Hibernate 中 SQLFunction 类的翻译
2012-05-13 13:27 1206org.hibernate.dialect.funct ... -
Java Matcher 翻译
2012-05-11 19:09 1047java.util.regex Class Mat ... -
Java Method 翻译
2012-05-04 15:21 1083java.lang.reflect Class Met ... -
Java Class 的翻译
2012-05-04 14:49 1053java.lang Class Class<T&g ...
相关推荐
以前写了一个java的正规表达式的java工具类,分享一下,有用到的欢迎下载使用。 如果你有常用的定义好的,且测试通过的正规表达式,欢迎跟贴,也让我享用一下 . 类中用到了 jakarta-oro-2.0.jar 包,请大家自己在 ...
《Software Architecture Design Patterns in Java》PDF 下载,本来是想0分的,但最低只能设置2分。
This article introduces Struts, a Model-View-Controller implementation that uses servlets and JavaServer Pages (JSP) technology. Struts can help you control change in your Web project and promote ...
翻译文档: PS:待开发中。。。。 我的学习笔记,记录学习过程中的笔记以及遇到的问题,以及我的一些经验总结。如果出现链接失效,或者想知道更多的内容等情况可以提交 Issues 提醒我修改相关内容。 PS:我的学习笔记,...
designPattern3设计模式3:适配器模式,篮球翻译适配器,游戏存进度,备忘录模式基本代码,游戏进度备忘
关于 MVC 的简短摘要 去做控制器 翻译成英语控制器是视图的一种策略(strategy pattern)。 一方面,他负责何时激活或停用哪些控件(例如按钮)。 此外,视图中触发的所有操作(例如按钮点击)都委托给控制器。 然后...
机器学习经典著作《pattern recognition and machine learning》的中文翻译版本,机器学习入门必备!
21. Java 认证和授权服务(JAAS)供应器 21.1. 概述 21.2. 配置 21.2.1. JAAS CallbackHandler 21.2.2. JAAS AuthorityGranter 22. CAS 认证 22.1. 概述 22.2. CAS 是如何工作的 22.3. 配置CAS ...
Font Pattern Maker 自動幫你補捉PC系統字型並轉換為12X18pixels的C語言陣列 Table for your application.
开发诸如编译器,解释器和汇编器之类的翻译器。 开发通信协议行TCP / IP,UDP等 正则表达概念 RegularExpression是Java 1.4版本发行的版本,并存在于java.util.regex软件包中。 RegularExpression是一种根据特定...
Martin Fowler的经典论文《Inversion of Control Containers and the Dependency Injection pattern》的中文翻译。In the Java community there's been a rush of lightweight containers that help to assemble ...
积分管理系统java源码 目前有一些自然语言处理工具,可以快速地完成NLP任务,如: NLTK:处于领先的地位,提供了 WordNet 、分类、分词、标注、语法分析、语义推理等类库。 Pattern:包括词性标注工具,N元搜索,情感...
正则表达式由pattern和flags组成,我不知道怎么翻译这个,我用我自己的话解释一下,pattern可以理解为一个函数(做什么), flags可以理解为参数, 比如flags为g为全局匹配,i为忽略大小写。 字面量 这种方法最方便...
翻译: 很多程序员在读完这本书,宣布自己相当于经历了一次"主显节"(纪念那稣降生和受洗的双重节日),如果你从来没有读 过这本书,你会在你的程序教育生涯里存在一个严重裂沟,所以你应该立即挽救弥补! 可以这么说:GoF ...
DictGen:字典生成器 字典 SQL 的自动生成器。... INPUT_TRANSLATION_DIR是一个文件,您可以在其中放置密钥及其翻译(其他语言)。 此文件必须具有偶数行。 EXTENSION_PATTERN_MAP是扩展和模式映射。 每个条
模式(pattern)是产生和识别元素的规则,记号(token)是按照某个模式识别出的元素,单词(lexeme)是被识别出的元素自身的值。 正规式 正规式是描述语言的规则,可以用来描述语言的语法结构。正规式的定义、字符...
观察者模式(Observer Design Pattern)是行为型设计模式的一种,主要解决的是“类或对象之间的交互”问题。它定义了一个一对多的依赖关系,当一个对象的状态改变时,所有依赖的对象都会自动收到通知。 观察者模式...
理解C#中的委托[翻译] 利用委托机制处理.NET中的异常 与正则表达式相关的几个小工具 你真的了解.NET中的String吗? .NET中的方法及其调用(一) 如何判断ArrayList,Hashtable,SortedList 这类对象是否相等 帮助解决...
Ant风格的pattern 4.7.2.2. classpath*: 前缀 4.7.2.3. 其他关于通配符的说明 4.7.3. FileSystemResource 提示 5. 校验,数据绑定,BeanWrapper,与属性编辑器 5.1. 简介 5.2. 使用Spring的Validator接口进行校验 ...