7 kyu
Regexp Basics - is it a eight bit unsigned number?
127 of 1,470taw
Loading description...
Regular Expressions
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
I don't understand, why is "1" Test Case schould return False? No White spaces in between !?
It was very interesting and exciting!
This comment has been hidden.
This comment has been hidden.
RegEx is ok. Delete ^ and $.
JavaScript, TypeScript, Python, C# and Java translations added (no strict checks for using regex)
Huh?... It shows 2 versions of C# :D
Wow, I haven't seen it for while, but it's a thing and it used to be relatively frequent: https://github.com/Codewars/codewars.com/issues/1189
The kata does not enforce the use of regex.
This comment has been hidden.
In the last test case, the string is '1', the result of case '1' should be true, but expected result is false!!!
The answer is the literally one comment down from yours.
Test cases seem to contradict one another.
In one case this occurred:
However, in another case the test case said the exact opposite to the one above:
All test cases are correct, your regexp is just matching whitespace when it shouldn't.
This comment has been hidden.
This comment has been hidden.
My solution keeps timing out. It works for the sample test cases. Maybe I have to think about it more.
Tests have a lot of test cases, but they aren't trying to force any special performance, it could be servers timing out.
Yes it says the servers are timing out, but tonight only your kata time out so far.
No one else passed on the 8 bit kata but you I suppose?
I am facing the same timeout. There is no timeout if my code doesn't work correctly. It just fails because of wrong output. But in case of what I expect to be the correct answer, the code fails with a server timeout. There might be some sort of infinite loop in the tests. Because if it were my code that was causing the timeout, the warning would have been about 6000ms timelimit rather than server timing out.
I'm sort of surprised, I just loop -1200 to +1200 and test each one if it ought to fit or not. I don't do anything crazy.
I reduced number of tests, it might be easier now.
Works now. Too many tests were the problem. Maybe you should use random numbers between the desired range rather than have thousands of tests.