Answer the question
In order to leave comments, you need to log in
Symfony socket for redis?
How to implement communication between Symfony4 and Redis ?
Answer the question
In order to leave comments, you need to log in
Do you by any chance want to repeat this?
https://symfony.com/doc/current/components/cache/a...
>>> import re
>>> str1="aaa (bbb) [ccc].ddd"
>>> re.match('(.*)\s+\((.*)\)\s+\[(.*)\]\..*',str1).groups()
('aaa', 'bbb', 'ccc')
show how you are trying
in the case of an example, it is generally easier with substrings, and not with regular expressions
It's also possible like this:
a = [i for i in 'aaa (bbb) [ccc].ddd' if i == 'a']
b = [i for i in 'aaa (bbb) [ccc].ddd' if i == 'b']
c = [i for i in 'aaa (bbb) [ccc].ddd' if i == 'c']
print('%s,%s,%s' % (''.join(a), ''.join(b), ''.join(c)))
# если нужно ссылаться на эти значения, то можно и так написать
# a1 = '%s,%s,%s' % (''.join(a), ''.join(b), ''.join(c))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question