I want to find all data enclosed in [[ ]]
these brackets.
[[aaaaa]] -> aaaaa
My python code (using re library) was
la = re.findall(r'\[\[(.*?)\]\]', fa.read())
What if I want to extract only 'a' from [[a|b]]
Any concise regular expression for this task? ( extract data before |
)
Or should I use additional if statement?