The problem:
I need to extract strings that are between $ characters from a block of text, but i’m a total n00b when it comes to regular expressions.
For instance from this text:
Li Europan lingues $es membres$ del sam familie. Lor $separat existentie es un$ myth.
i would like to get an array consisting of:
{'es membres', 'separat existentie es un'}
A little snippet in Python would be great.
Import the
remodule, and usefindall():The pattern
prepresents a dollar sign (\$), then a non-greedy match group ((...?)) which matches characters (.) of which there must be zero or more (*), followed by another dollar sign (\$).