Timeline for Identify Redundant Regex
Current License: CC BY-SA 4.0
31 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 30 at 19:50 | history | edited | 97.100.97.109 | CC BY-SA 4.0 | added 220 characters in body |
| Oct 30 at 14:44 | answer | added | Seggan | timeline score: 0 | |
| Oct 28 at 16:46 | answer | added | Dominic van Essen | timeline score: 3 | |
| Oct 28 at 16:20 | answer | added | m90 | timeline score: 4 | |
| Oct 27 at 16:57 | comment | added | Kevin Cruijssen | @97.100.97.109 Yeah, I would probably mention there won't be any empty items (e.g. no | as prefix or suffix, nor any ||), so existing answers would still be fine. I wouldn't try to fix the ^[a-z|]*$ regex, but simply remove it. I must admit that initially that regex for the allowed inputs confused me a for a minute as well, since the entire challenge is also regex-based. 😅 | |
| Oct 27 at 16:00 | comment | added | 97.100.97.109 | @KevinCruijssen By the rules described above, I think yes; however, since (as you said) the edit would break multiple answers, I'm not sure if I should add what amounts to a rule-change after the question has been up for a few days already. | |
| Oct 27 at 15:59 | history | edited | 97.100.97.109 | CC BY-SA 4.0 | added 25 characters in body |
| Oct 27 at 12:57 | answer | added | Rosario | timeline score: 0 | |
| Oct 27 at 8:07 | answer | added | Kevin Cruijssen | timeline score: 0 | |
| Oct 27 at 7:59 | comment | added | Kevin Cruijssen | Is a|b| a valid input? And I assume it should output True if it is? (Based on your input-regex ^[a-z|]*$ it is, but it would break multiple existing answers.) | |
| Oct 26 at 20:55 | answer | added | z.. | timeline score: 1 | |
| Oct 26 at 11:27 | comment | added | Peter Cordes | @doubleunary: Ironically in C, strstr can check if a string is a subtring of another string, but there isn't a function to ask if it's a prefix! (strcmp doesn't return a mismatch position which would let you check that all of the shorter string matched, just a - / 0 / + ordering relation. This part of C's standard library is pretty badly designed in terms of API. I guess with explicit-length strings you could use memcmp of the shorter string against the longer string.) | |
| Oct 25 at 21:26 | comment | added | doubleunary | @mousetail — I can cut 22 bytes off my answer when only considering prefixes, so in my opinion it's not a trivial difference. That's language dependent of course. | |
| Oct 25 at 20:32 | answer | added | Neil | timeline score: 0 | |
| Oct 25 at 18:32 | comment | added | mousetail | I think it's still very similar. There is no real difference between the code needed to check for a prefix or a substring | |
| Oct 25 at 17:57 | review | Close votes | |||
| Oct 26 at 14:18 | |||||
| Oct 25 at 17:52 | comment | added | doubleunary | @mousetail cannot see any prefix in term|watermelon|melon? | |
| Oct 25 at 17:39 | comment | added | mousetail | This question is similar to: Is it a prefix code?. If you believe it’s different, please edit the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem. | |
| Oct 25 at 15:07 | answer | added | Wheat Wizard♦ | timeline score: 1 | |
| Oct 24 at 23:59 | answer | added | Neil | timeline score: 0 | |
| Oct 24 at 22:06 | history | became hot network question | |||
| Oct 24 at 21:24 | answer | added | l4m2 | timeline score: 1 | |
| Oct 24 at 20:16 | answer | added | Jonathan Allan | timeline score: 5 | |
| Oct 24 at 20:05 | answer | added | Shaggy | timeline score: 2 | |
| Oct 24 at 19:38 | answer | added | doubleunary | timeline score: 0 | |
| Oct 24 at 19:17 | answer | added | pajonk | timeline score: 4 | |
| Oct 24 at 17:49 | answer | added | Albert.Lang | timeline score: 6 | |
| Oct 24 at 17:11 | answer | added | Denis Ibaev | timeline score: 2 | |
| Oct 24 at 14:19 | answer | added | Arnauld | timeline score: 1 | |
| Oct 24 at 13:56 | comment | added | 97.100.97.109 | Related challenge (h/t @fryamtheeggman) | |
| Oct 24 at 13:52 | history | asked | 97.100.97.109 | CC BY-SA 4.0 |