FamilySearch/pewpew

Feature request: parseInt

Closed this issue · 3 comments

Describe the bug

Currently after doing a match() we only have the ability to get strings out of the regex (even with (\d) capture groups). It would be very handy to be able to turn those back into numbers so we can use them for counters/incrementers/ranges

Expected behavior

We should be able to convert a string that is only numbers into a number

This is unlikely to be implemented as we are pursuing scripting capabilities instead of expanding the current expressions.

Thanks.

@EliSnow please rethink this as at the moment I am stuck with my script. I need to extract a number from the content-length header and only get strings back.