Re: How to spell out Roman numerals


Luke Davis
 

On Sun, 8 Nov 2020, Brian Vogel wrote:

I'd have to say that I disagree with you about regular expressions not being confusing, and particularly to those who don't have a programming background
Okay, I was probably too cavalier in saying that.
They can be confusing, especially in the more advanced concepts.
I have been using them for nearly 25 years, and I still have to refresh myself on certain details from time to time.
But the basics of what they are doing does not have to be confusing. You can learn to pick them apart and understand more about what's going on then just seeing a pile of weird parentheticals and punctuations. You may not always understand the depths of some esoteric construction, but i believe the basics can be learned without a programming background, at least enough to use them for solving moderate problems.

Getting mad ninja skills with them takes years of familiarity, as does anything, even spoken languages.

with regular expressions is clearly fresher and better than mine is.As you know from my private e-mail to you, while I can figure out how one can capture
I don't know about that, but it may be more twisty. I started with writing and debugging expressions used in the very old days to fight email spam, before the big companies took over that business. Some of those expressions could be mind blowing, hair pulling, and thousands of characters long. I was very much thrown in the deep end and had to learn to swim or else.

the Roman numerals one through four, or five through eight, with a single "compact" regular expression pattern match I have no idea how one would then have
that match parsed out for replacement as individual letters.  If you want the individual letters, things get much more messy.
As far as I can tell, it can't be done except as we've done it. There is no cleaner way. Though I'd love to learn of one.

soon as Janet had noted that her needed range was the Roman numerals one through ten, I took the easy way out, and a way that I felt was "more
I never saw that, not having received her messages.

understandable" to the person who was going to used it.I only wish I could figure out a way to handle Roman numeral one reliably sans a delimiting colon.  I
can find no way to do that which doesn't require linguistic analysis rather than pattern matching.  The pronoun I is just so common which makes it a
nightmare.  You can pretty much count on a capital I followed by a verb being the pronoun, not a Roman numeral, but there is no way I know of to express
that in a regex.
Agreed. I suspect machine learning and neural nets would be the class of solutions preferred for that one.

It does beg the question though: why in the world are we still using Roman Numerals? We don't have to carve straight lines into rock in order to record our numbers any more, for Jupiter's sake. But that's a question for another day, and another list.

Luke

Join nvda@nvda.groups.io to automatically receive all group messages.