0

Is there anything ready on the str to get the the list of values requested in the string?

For example if I have a string like: I need two values {foo} and {boo}", is there anything that return me a list like ('foo', 'boo') or I must write a regex?

I see there is the Template class in string and the class has a flags method, but I don't understand how to use it.

Thank you

Karim N Gorjux
  • 2,880
  • 22
  • 29
  • your question is not clear. do you want to get string which are surrounded by curly braces? if yes, regular expression is the best thing. or, you want to search for a set of words in a string? – Wasi Ahmad Nov 13 '17 at 01:03
  • @Rawing thanks for the answer. This is exactly what I needed! – Karim N Gorjux Nov 13 '17 at 01:41

0 Answers0