# Help with Curl Regex ( is this ever possible)

**URL:** <https://forum.beeminder.com/t/help-with-curl-regex-is-this-ever-possible/12452>\
**Category:** Tech\
**Created:** [June 29, 2025, 2:03pm UTC](https://forum.beeminder.com/t/help-with-curl-regex-is-this-ever-possible/12452 "2025-06-29T14:03:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![baronvonchickenpants](https://avatars.discourse-cdn.com/v4/letter/b/d26b3c/32.png) [@baronvonchickenpants](https://forum.beeminder.com/u/baronvonchickenpants)\
**Post date:** [June 29, 2025, 2:03pm UTC](https://forum.beeminder.com/t/help-with-curl-regex-is-this-ever-possible/12452/1 "2025-06-29T14:03:12Z")

</div>

Hi there,

I am still trying to pull in stats from [Chess.com](http://Chess.com) about games played to track.

They have an API and Beeminder /can/ access their API call -

[https://api.chess.com/pub/player/baronvonchickenpants/stats](https://api.chess.com/pub/player/baronvonchickenpants/stats)

The section I am interested in is this :-

“chess\_rapid”: {  
“last”: {  
“rating”: 1354,  
“date”: 1751201893,  
“rd”: 81  
},  
“best”: {  
“rating”: 1525,  
“date”: 1725655910,  
“game”: “[Chess: Dannibees vs BaronVonChickenpants - Chess.com](https://www.chess.com/game/live/107969366659)”  
},  
“record”: {  
“win”: 202,  
“loss”: 169,  
“draw”: 11  
}

I want to add up the win/loss/draw numbers withing that bottom ‘record’ section and Beemind the total number.

Is this possible with the regex / curl integration? Can a Regex sum nubmers or is it just extracting the one figure?

If the former, can anyone help write it?

If the latter can I extract each separately and somehow have some meta goal to track the total?

---

<div class="post-metadata">

**Author:** ![narthur](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/narthur/32/5113_2.png) [@narthur](https://forum.beeminder.com/u/narthur)\
**Post date:** [June 29, 2025, 2:46pm UTC](https://forum.beeminder.com/t/help-with-curl-regex-is-this-ever-possible/12452/2 "2025-06-29T14:46:24Z")

</div>

I think the answer is no, you can’t use a regex to sum the numbers like you need. I think the best approach would be to use something like val.town to parse and add up the numbers and then post the result to your Beeminder goal using the Beeminder API.

- [https://www.val.town/](https://www.val.town/)
- [https://api.beeminder.com/](https://api.beeminder.com/)

How comfortable are you writing some basic javascript?

If you’d rather avoid writing code, you could use [make.com](http://make.com) instead to do the same thing using a visual automation builder.
