I’m pretty new to Emacs Lisp and still learning how to do some of the basics.
I have some text like [123] and I want to extract the number 123. I’ve goofed around with a few different attempts but I still can’t seem to capture the number reliably. The closest I’ve gotten is extracting the character ].
Can anyone point me in a direction? My biggest struggle is in understanding how to capture the number once I’ve used search-forwards and search-backwards to capture the point positions of the brackets.
Thanks in advance!
Try
Alternatively, when the point is already on top of the number,
thing-at-pointmay be more convenient: