Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wrote a program to add Roman numerals using Sed. You really just have to use regular expression substitutions to convert it all to unary (e.g. substituting IX -> VIV, IV -> IIII, V -> IIIII in that order), then remove plus and white space, then perform reverse substitutions to “compactify” the result again.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: