non greedy grep command on ubuntu?
- by ChrisRamakers
Hi all,
I'm building a script which filters out all our translatables from our template system.
the problem i'm facing is the occasion where 2 translatables are on one line.
These are 2 example lines from a template file which both hold one or more translatables
<img src="/captcha/generate.jpg" alt="[#Captcha#]" />
<span>[#Velden met een * zijn verplicht in te vullen#]</span> <button type="submit" name="frm_submit" class="right">[#Verzend#]
And when i set loose the following regexp
egrep "\[#(.*)#\]" . -Rohis
I get this output
[#Captcha#]"
[#Velden met een * zijn verplicht in te vullen#]</span> <button type="submit" name="frm_submit" class="right">[#Verzend#]
While the desired output is
[#Captcha#]
[#Velden met een * zijn verplicht in te vullen#]
[#Verzend#]