Thanks, that helps a little. I don't think I was clear on the java link.
I'll try a few things and see what I can come up with....
At 05:34 AM 2/13/2007, you wrote:
Hi,
I am just getting back into velocity myself. I found the user docs from
the Wiki. The user docs are here:
http://velocity.apache.org/engine/devel/user-guide.html
You can see more info in the nav there.
Basically, if $foo is a java.lang.String, you can use all the methods of
the string object (like contains). Does that help?
best,
-Rob
On Tue, 13 Feb 2007 07:28:10 -0500, tech1 <[EMAIL PROTECTED]> wrote:
I'm new to Velocity, but I have some experience in programming. I am,
however, having a hard time finding any references to syntax, available
commands, etc..... I'd like to do a few things like search, search &
replace, search and destroy....and I'm sure there will be others down
the road... I tried the Velocity site at Apache but there wasn't much
there but dead links. And when I search the web or news groups I get
mostly articles about the speed of light or cars.... I was surprised to
hear that "contains" was actually a command that would work. So....is
"replace" another command that will work?
Is there a good source for this info somewhere so I don't have to keep
asking?
At 08:58 AM 2/3/2007, you wrote:
On Sat, 03 Feb 2007 10:37:54 -0500, Claude Brisson <[EMAIL PROTECTED]>
wrote:
Try with:
#if($foo.indexOf("moo foo") >= 0)
or
#if($foo.contains("moo foo"))
Claude
Le samedi 03 février 2007 à 08:30 -0700, tech1 a écrit :
I'd like to use a conditional statement that tests content for
keywords.
I've only been able to find gt, lt or == as conditionals in any of the
user
guides......
For example:
#set( $bar = ["foo", "moo foo", "bar moo foo", "bar foo moo", "foo
moo
foo"] )
#foreach ( $foo in $bar )
#if ( $foo contains "moo foo")
#do some stuff
#end
#end
Which will do stuff with "moo foo" "bar moo foo" and "foo moo foo"
;
and ignore "foo" and "bar foo moo".
Is there any way to search contents using an if statement in Velocity?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]