由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - regex question?
相关主题
A regular expression questionDo you guys use lex to parsing input?
大家都这么处理cross site scripting?Regular Expression question: how to enumerate all matches?
regex急求帮助简单算法问题
must-have Eclipse plug-ins想说动同事用java而不是c++做新项目,大家能否列举一下优点?
regular expression for whitespace in path这个是JSP的什么技术
JAVA里什么METHOD是用来STRING PATTERN SEARCH有没有检查IP范围的算法?
How to get a matched String?java 截取一部分string
java regex pattern question向各位朋友请教一道题目
相关话题的讨论汇总
话题: string话题: regex话题: targe话题: othertext话题: neededtext
进入Java版参与讨论
1 (共1页)
n******8
发帖数: 172
1
String a="> < neededtext here> othertext"
how to obtain the string between first "<" and last ">"
c**t
发帖数: 2744
2
"<(?targe[^>]*)>" );

【在 n******8 的大作中提到】
: String a="> < neededtext here> othertext"
: how to obtain the string between first "<" and last ">"

n******8
发帖数: 172
3
Thanks, any good tutorials online for regex?

【在 c**t 的大作中提到】
: "<(?targe[^>]*)>" );
c**t
发帖数: 2744
4
http://www.regular-expressions.info/

【在 n******8 的大作中提到】
: Thanks, any good tutorials online for regex?
n******8
发帖数: 172
5
Exception in thread "main" java.util.regex.PatternSyntaxException: Unknown
inline modifier near index 3
<(?targe[^>]*)>
^
Get busy, will figure it out later. For now, get it done by String.

【在 c**t 的大作中提到】
: http://www.regular-expressions.info/
g**********y
发帖数: 14569
6
input.replaceAll("^.*?<(.*)>.*?$", "$1");
1 (共1页)
进入Java版参与讨论
相关主题
向各位朋友请教一道题目regular expression for whitespace in path
请教文本替换JAVA里什么METHOD是用来STRING PATTERN SEARCH
怎样截取网页
中多个

之间的内容?
How to get a matched String?
Please give me some ideas!! About the Object database invocation.java regex pattern question
A regular expression questionDo you guys use lex to parsing input?
大家都这么处理cross site scripting?Regular Expression question: how to enumerate all matches?
regex急求帮助简单算法问题
must-have Eclipse plug-ins想说动同事用java而不是c++做新项目,大家能否列举一下优点?
相关话题的讨论汇总
话题: string话题: regex话题: targe话题: othertext话题: neededtext