a question of using regular expression

Paul Lutus nospam at nosite.zzz
Wed Nov 28 03:02:18 EST 2001


"Stephen" <fungho at sinaman.com> wrote in message
news:b551ef53.0111272346.68222906 at posting.google.com...
> I am now using org.apache.regexp as the regular expression library in
> my Java code. I meet a difficulty in implementating the following
> regular expression, I don't know how to describe it (because of my
> poor English), so I take an example:
>
> String sText0 = "good morning!";
> String sText1 = "morning! you are very good!";
>
> RE r = new RE("???????????"); // I have no idea in this
>
> actually, I just want to get the string which has string "good" at the
> start. Therefore, in this case, sText0 can be got only. How can I do
> this? Thanks!

Why don't you read up on how to write regular expressions? This information
is available on the Internet, in textbooks, and in articles.

http://www.google.com/search?q=writing+regular+expressions

--
Paul Lutus
www.arachnoid.com







More information about the Python-list mailing list