Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Delimiter Doubts...  RSS feed

 
Brinz Narasimhan
Greenhorn
Posts: 5
Eclipse IDE Redhat Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Im reading value from property file and delimiting using [, and :]

The format of the property file is as below,

ex:

brindha:allow, akila:allow, priya:allow

im using (,)comma as delimiter and im able to retreive the value as belows,

brindha:allow
akila:allow
priya:allow

Is there any possible ways to have these values in list and delimit based on [:] colon, and assign it in different strings.

ex: id = brindha
access = allow

id=akila
access=allow

id=priya
access=allow

Please advise....

Thanks and Regards,
Brinz
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Brinz Narasimhan wrote:
Is there any possible ways to have these values in list and delimit based on [:] colon


You already know how to split(), obviously, so just split those smaller pieces on colon the way you split the overall string on comma.

, and assign it in different strings.


Yes. I don't understand why you're asking this part of the question. You know how to assign a value to a variable, right?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!