The Roman numeral system is an ancient way of representing numbers. The base symbols are I (1), V (5), X (10), L (50), C (100), D (500) and M (1000).
Questions tagged [roman-numerals]
273 questions
3
votes
1 answer
Sort a string of Roman Numerals
The input will be a string of Roman numerals that have to be sorted by their value. Also this task has to be completed using classes in c++
So far I've created my class
#include
#include
using namespace std;
class…

Triple3XH
- 113
- 3
- 11
3
votes
2 answers
Match several occurrences or zero (in this order) using regular expressions
I want to match roman numbers using Groovy regular expressions (I have not tried this in Java but should be the same).
I found an answer in this website in which someone suggested the following…

Alex
- 33
- 3
3
votes
0 answers
If statement inside for loop for Roman numerals
I am making a program to change decimal numbers to Roman numerals. I am close to making numbers 1–8 work, but for some reason 3 won’t show up. I just want to get this problem solved. Once I do, I feel like I can build the rest of the program. Keep…

Scott M
- 187
- 2
- 11
3
votes
1 answer
Python regex. Match and replace roman numerals
Need some help with regular expressions.
I want to match some Roman numerals and replace them to arabic.
First of all if use (IX|IV|V?I{0,3}) to match roman numerals (from 1 to 9).
Then i add some logic to either space (with some text before) or…

Digital God
- 471
- 1
- 5
- 17
3
votes
2 answers
Convert from numbers to roman notation
I want to convert from numbers to roman notations. I have been given a list which looks like this:
conv = [[1000, 'M'], [900, 'CM'], [500, 'D'], [400, 'CD'],
[ 100, 'C'], [ 90, 'XC'], [ 50, 'L'], [ 40, 'XL'],
[ 10, 'X'], [ 9,…

jopp
- 193
- 1
- 8
3
votes
1 answer
Using type parameters and mixins in Scala
EDIT 2:
I managed to achieve the type safety I wanted in my exercise with RomanNumerals using a combination of mixins and type parameters with the code below. In essence what it does is after importing everything in RomanNumerals I am able to write…

Emil L
- 20,219
- 3
- 44
- 65
3
votes
2 answers
Single Regex for filtering roman numerals from the text files
I am stuck in between of a problem where only one pass of regular expression is allowed( some old hard code). I need the regex for roman numerals.
I have tried the standard one i.e. ^(?i)M*(D?C{0,3}|C[DM])(L?X{0,3}|X[LC])(V?I{0,3}|I[VX])$, but the…

Nains
- 258
- 2
- 15
3
votes
2 answers
Need to format character precedence in Strings
I'm currently writing a Roman Numeral Converter for the fun of it. The problem works up to the aforementioned character precedence.
Since Roman Numerals are not positional, i.e. III does not symbolize 1*whatever base^2 + 1*whatever base^1 +…

Christian
- 31
- 1
3
votes
1 answer
Converting integers into words and roman numerals
Is there a library to convert integers into strings, so that they (integers) will be represented as words? For example:
21 => "twenty one"
I'm also interested in converting integers into strings that represent them as Roman numerals:
21 =>…

Mark Karpov
- 7,499
- 2
- 27
- 62
3
votes
4 answers
How to add roman numbers to the appendix pages in LaTex?
is there a way to have roman numbers for the pages at the end of the article - like \bibliography{...}, \listoffigures and acronym-lists?
Currently they show up without any numbers :(
Cheers,..
Argh sorry - I was kind of incorrect I'm not looking…

pagid
- 13,559
- 11
- 78
- 104
3
votes
1 answer
Roman numerals as page number in database
Suppose I have the following table:
create table Section (
id integer not null primary key,
book_id integer not null foreign key references Book (id),
title varchar(100) not null,
page_start varchar(10) not null,
page_end…

Jordan Reiter
- 20,467
- 11
- 95
- 161
2
votes
3 answers
Sorting html elements that were ordered by roman numeral IDs
I have generated HTML (i have no control of this) similar to this:
- one
- two
- three
- four
- nine
- five
- six …

Jeele Yah
- 427
- 7
- 12
2
votes
2 answers
Changing Latex section numbering presentation
I'm trying to change how section numbering is displayed in a Latex document I'm working on. What I want to do is this:
Section Title
(i) Subsection title in normal weight
(a) Lorem ipsum (no subsubsection title being used)...
I've come…

derek lawless
- 2,544
- 2
- 16
- 13
2
votes
1 answer
Recognize roman numeral followed by '.', space and then capital letter. (RegEx)
Can someone please help me with this?
I'm trying to match roman numerals with a "." at the end and then a space and a capital letter after the point. For example:
I. And here is a line.
II. And here is another line.
X. Here is again another…

Santiago
- 25
- 3
2
votes
1 answer
Use sed to convert roman numerals to arabic numerals
I have text file format like this
SKI
SKII
SKIII
SKIV
SKV
SKVI
SKVII
I want to convert it with sed command into numerical. Can you help me out?
SK1
SK2
SK3
SK4
SK5
SK6
SK7
Thanks a lot!

Jianguo
- 89
- 1
- 8