This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / Java TEST!!
-ddddd(ddddd);
2002-2-13
{924}
(#367880@0)
-
use Regular Expression, here is VB code, you can easily find some libary on the netDim a As RegExp
Set a = New RegExp
a.Global = True
a.Pattern = "\\\\"
s = "abc\\\\|def|gh\\\\\\\\\\\|ij\\kl\\\\\m"
b = a.Replace(s, Chr(7))
a.Pattern = "([^\\])\|"
b = a.Replace(b, "$1 ")
a.Pattern = "\\\|"
b = a.Replace(b, "|")
a.Pattern = "\\(\w)"
b = a.Replace(b, "$1")
a.Pattern = Chr(7)
b = a.Replace(b, "\")
-interview(intervieweree);
2002-2-14
{390}
(#368402@0)
-
This is a very common tokenize problem in C++ and Java. Take a look at StringTokenizer class, you will get some hints.
-hellangel(地狱天使);
2002-2-14
(#368558@0)
-
Just use oroinc 的 perl library . easy .
-acezl(笨笨张);
2002-2-14
(#368805@0)
-
first time heard. Java embeds a Perl Lib?whould you give out some sample code for that?
The generic way to solve that problem is lex/yacc,
I'm sure there are a lot of Java lex/yacc libs on the net
-interview(intervieweree);
2002-2-14
{161}
(#368823@0)
-
check it out : http://jakarta.apache.org/oro/
-acezl(笨笨张);
2002-2-14
(#368826@0)
-
why it doesn't work normal? please give help
-dddddd(007_007);
2002-2-14
{2361}
(#368891@0)
-
because you are revamping the wheel. use regular expression.
-interview(intervieweree);
2002-2-14
(#368923@0)
-
This becomes an interesting questionI can do it by using StringTokenizer class.
Let me give you an hint: When you get the token, check the "\" char, if you found one replace it with a "|" char and oncatenate it with next token.
-hellangel(地狱天使);
2002-2-14
{201}
(#369137@0)
-
看这儿!!!
-3yyy(锅碗瓢盆铲1个都不能);
2002-2-15
{1254}
(#370237@0)