My problem is similar as the one answered here: How to create an auto updating Google spreadsheet with information from Steam?

Only I need to modify the REGEXEXTRACTs to find total hours played instead of hours played last 2 weeks for Counter-strike

As a example I will use my own profile here http://steamcommunity.com/profiles/76561197964409756/games/

from which the most relevant part of the script is

"name":"Counter-Strike: Global Offensive","last_played":1489175820,"hours":"15.5","hours_forever":"3,780","friendlyURL":"CSGO",

So I am trying to get hours_forever which is in this example is 3780.


You can use this regex:


the \d and , inside the [] brackets means it will only extract either a digit or a comma

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.