Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Activity for --Hyde‭

Type On... Excerpt Status Date
Comment Post #291538 Got it. Thanks for your patience.
(more)
6 months ago
Edit Post #291538 Post edited:
6 months ago
Edit Post #291542 Initial revision 6 months ago
Answer A: The 50 substrings that validate any string of Roman numerals
Google Sheets, 155 bytes ``` =regexextract(A1,"CCCC|CC[DM]|CM[CDM]|DC[DM]|DD|DM|I[CDLM]|IIII|II[VX]|IVI|IX[CILVX]|L[CDLM]|LX[CL]|MMMM|V[CDLMVX]|VI[VX]|XCC[DLMX]|XD|XLX|XM|XX[CL]|XXXX") ``` The same regex as in my JavaScript answer. Returns an error on valid strings.
(more)
6 months ago
Edit Post #291538 Post edited:
move Google Sheets formula to its own answer
6 months ago
Comment Post #291538 @#53890 thanks, but I don't really see the point, because the same pattern can be used as is in most any regex capable language. I wanted to show the Google Sheets formula because it uses `regexextract()` instead of the `regexmatch()` as one's knee-jerk approach would often be. First time here so I d...
(more)
6 months ago
Edit Post #291538 Initial revision 6 months ago
Answer A: The 50 substrings that validate any string of Roman numerals
JavaScript, 149 bytes ``` t=>t.match(/CCCC|CC[DM]|CM[CDM]|DC[DM]|DD|DM|I[CDLM]|IIII|II[VX]|IVI|IX[CILVX]|L[CDLM]|LX[CL]|MMMM|V[CDLMVX]|VI[VX]|XCC[DLMX]|XD|XLX|XM|XX[CL]|XXXX/) ``` Simple regex. Returns `null` on valid strings. Try it online!
(more)
6 months ago