#Nestor

1 messages · Page 1 of 1 (latest)

real carbonBOT
plucky elm
#

HI 👋 I don't think there is a great way to distinguish what your code should consider an ID and what is a fixed part of the path without telling it explicitly where to look.

vernal zenith
#

so, there isn't a regexp I could use to identify all ids?

plucky elm
#

You might be able to build one, but I don't know what that would be off-hand.

vernal zenith
#

that's what I'm trying. I will see if I can find one that works with all the fixtures at least

#

Thanks

plucky elm
#

Most of our objects use a 2-3 character prefix, followed by an underscore, and ending with an alphanumeric string (though there are exceptions like Coupons where the id can be custom defined). Some objects (like Checkout Sessions) will have a test or live string included in between the ID prefix and the ID. You might be able to use that as a starting point.

vernal zenith
#

good to know about coupons, I didn't think of that one