Turbine uses Regexp and I have a question on Regexp:

A simple usage of Regexp is:

RE r2 = new RE("abc");
boolean matched2 = r2.match("abc_match_it");

if I want to use a variable instead:

String V = "abc";
RE r2 = new RE(V);
boolean matched2 = r2.match("abc_match_it");

Now, if I what to match this at the begining of the line with a variable,
I have a problem. ^ - is used to represent the begining of a line, but how
do I use it in conjunction with a variable? I tried:

RE r2 = new RE(^V);
RE r2 = new RE("^V");
RE r2 = new RE("^"V);
RE r2 = new RE("^""V");

Java compiler does not link any of these....It works if I do not use
variables:

String V = "^abc";

is OK. Alternativly, I could probably apply a chain rule, but I don't know
how to do this.

Any suggestions?

michael










--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to