Timeline for How to specify AND / OR operators (conditions) for case statement?
Current License: CC BY-SA 4.0
18 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 13, 2024 at 16:19 | history | edited | muru | CC BY-SA 4.0 |
edited title
|
| S May 13, 2024 at 12:23 | history | edited | AdminBee | CC BY-SA 4.0 |
Improve formatting
|
| S May 13, 2024 at 12:23 | history | suggested | Anton Samokat | CC BY-SA 4.0 |
title updated to be able to search this qustion also for "OR case condition" and for "shell case syntax" search requests
|
| May 11, 2024 at 12:05 | review | Suggested edits | |||
| S May 13, 2024 at 12:23 | |||||
| Oct 31, 2019 at 3:01 | history | tweeted | twitter.com/StackUnix/status/1189739135428415492 | ||
| Oct 30, 2019 at 16:57 | answer | added | user232326 | timeline score: 3 | |
| Oct 30, 2019 at 16:37 | history | edited | user232326 | CC BY-SA 4.0 |
Typo.
|
| Oct 29, 2019 at 15:19 | answer | added | Stéphane Chazelas | timeline score: 7 | |
| Oct 29, 2019 at 1:52 | history | became hot network question | |||
| Oct 28, 2019 at 18:48 | vote | accept | smc | ||
| Oct 28, 2019 at 18:48 | vote | accept | smc | ||
| Oct 28, 2019 at 18:48 | |||||
| Oct 28, 2019 at 18:13 | answer | added | Jeff Schaller♦ | timeline score: 13 | |
| Oct 28, 2019 at 18:13 | comment | added | smc | @DonHolgo Ah, thanks for the hint. It worked, I also modified my question where my logic was wrong. Please feel free to make this comment as answer :). | |
| Oct 28, 2019 at 18:11 | history | edited | smc | CC BY-SA 4.0 |
edited body
|
| Oct 28, 2019 at 18:04 | comment | added | DonHolgo | @smc I suppose [aeiouAEIOU]*[0-9] would cover that case, but you'd need to have that as the first case because otherwise it would be covered by the current first one. Besides, your logic for begins/ends is wrong in a few places. | |
| Oct 28, 2019 at 17:55 | comment | added | smc | @guillermochamorro My end goal is if the user enters input that starts with vowel and ends with a number, it needs to print "The word ends with vowel AND ends with a digit.". But if I use OR (|), it will be escaped and I guess the case statement will choose option [aeiou]* | [AEIOU]* instead. | |
| Oct 28, 2019 at 17:48 | comment | added | schrodingerscatcuriosity |
Use | instead of &&. Have in mind that the conditions are mutually exclusive: it is OR not AND.
|
|
| Oct 28, 2019 at 17:40 | history | asked | smc | CC BY-SA 4.0 |