On Thu, Feb 16, 2012 at 8:52 PM, Smiley 4321 <ssmil...@gmail.com> wrote:
> int Jockey_Apple_cat_1KK(float, int, char, int);
> int Jockey_Apple_cat_look(int, float, int, int);
> int Jockey_Apple_cat_test_ki21es(int, int, int, int);
> int Jockey_Apple_cat_tarLK12OU(void, int, int, int);
> ---
>
> Here substring "Jockey_Apple_cat" is common from 3rd line onwards as a
> function name. I wish to extract ONLY that function name which has
> 'Jockey_Apple_cat' as a substring and ignore remaining function names.

Try this:

grep -o 'Jockey_Apple_cat[^(]*' test.conf

It's not Python, but it might serve you better than knocking something
together! But if you're using this to learn Python, Peter Otten's
solution is, I think, what you want.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to