I have a list of strings that look like

"funcname(arg, another_arg)*20 + second_func(arg1, arg2)"


and I want to pull out just the args. I've tried the following:

re.findall(r'\w[\w\d_]+(?!\()', string)


however this returns

['funcnam', 'arg', 'another_arg', '20', 'second_fun', 'arg1', 'arg2']


Firstly, I'm a bit confused as to why I am seeing the '20', since I specified the string should start with a word character. Secondly, I'm wondering how I can improve my look-ahead to match what I'm looking for.

I should note that some of the strings don't have functions and look like

"value1 + value_two"


so I can't simply search inside the parentheses.


Question: json load more items
Answer: see i guess somewhere in your network call (Async task) your "itemList" get updated without notifying adapter. because you are adding item in "doInBackGround" which is on different thread.

I would suggest you to use these two library for making REST network call and json parsing .
this is efficient in terms of memory and performance.

Android Asynchronous Http Client 

google-gson

these are open source . for any query ask me.