Well, the title pretty much says it all, I'm looking for a way to tell if a string has any letters in it or if it's made up of just numbers.
biblatex as a tag here because of my question's purpose:
I'm trying to write my own custom style and the
volume field automatically adds "vol." before the volume number. But the norms I have to follow make a few exceptions about that, and sometimes (and there isn't really a pattern to follow, these are just random exceptions) the "volume" field should be printed differently (as "year 4", for instance, instead of "vol. 4"). As it is the user can't fill in "year 4", though, or it'll print "vol. year 4".
The same goes for the
edition field. I add "ed." to it, so it prints something like "3rd ed.". But I want my users to be able to fill in something like "3rd ed. revised and augmented"… and as it is, if they do that, the bibliography will print "3rd ed. revised and augmented ed.".
So what I'm thinking is I could check if the volume and edition fields contain only numbers, and if so I can add "vol." and "ed.". Otherwise I won't add anything because I'll assume the user did it himself. Is there any other way to do something like that?
Thanks in advance,