This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Java in General and the fly likes how to find words between place holders Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "how to find words between place holders" Watch "how to find words between place holders" New topic
Author

how to find words between place holders

vittal mareddy
Greenhorn

Joined: Jul 24, 2011
Posts: 16
I have a value in string variable, i want to get wards between place holder, is there any api i can use from JDK1.5,

String str ="select user_name,'$user_name$','$test_app1$' from dm_user where r_is_group = FALSE and user_state = 0 and user_name not like 'dm%' order by user_name";

I need to get user_name, test_app1

Thanks
vittal








Rishi Shah
Ranch Hand

Joined: Sep 05, 2012
Posts: 43

You can use regular expressions:



You can learn about regular expressions here: http://codular.com/regex
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: how to find words between place holders