• Sign Up
    Time to claim your honor
  • Training
  • Practice
    Complete challenging Kata to earn honor and ranks. Re-train to hone technique
  • Freestyle Sparring
    Take turns remixing and refactoring others code through Kumite
  • Community
  • Leaderboards
    Achieve honor and move up the global leaderboards
  • Chat
    Join our Discord server and chat with your fellow code warriors
  • Discussions
    View our Github Discussions board to discuss general Codewars topics
  • About
  • Docs
    Learn about all of the different aspects of Codewars
  • Blog
    Read the latest news from Codewars and the community
  • Log In
  • Sign Up
Helral Avatar
Name:Unknown
Clan:RIGD-Loxia
Member Since:Aug 2016
Last Seen:Oct 2024
Profiles:
    Following:9
    Followers:9
    Allies:9
    View Profile Badges
    • Stats
    • Kata
    • Collections
    • Kumite
    • Social
    • Discourse
    • Conversations (67)
    • Replies
    • Authored
    • Needs Resolution
    • Custom User Avatar
      • KayleighWasTaken
      • created a suggestion for "Regular Expressions (groups): Splitting phone numbers into their separate parts." kata
      • 9 months ago

      Python fork

      • Stops tests crashing all the time.
      • Adds a couple fixed tests from here that are unambiguously correct by the spec (the '34 567890' one is unclear on its correctness, and the author solution disagrees with the issue on how it should be handled).
      • Adds random tests with somewhat decent coverage, please suggest more cases.
    • Custom User Avatar
      • KayleighWasTaken
      • created an issue for "Regular Expressions (groups): Splitting phone numbers into their separate parts." kata
      • 9 months ago

      No random tests

    • Custom User Avatar
      • KayleighWasTaken
      • created an issue for "Regular Expressions (groups): Splitting phone numbers into their separate parts." kata
      • 9 months ago

      Python tests beyond busted.

    • Custom User Avatar
      • cleverboy1
      • commented on "Regular Expressions (groups): Splitting phone numbers into their separate parts." kata
      • 2 years ago

      I spent a full day on it, but when it finally worked, it gave me pure satisfaction. Great kata!

    • Custom User Avatar
      • Teabird
      • created a question for "Regular Expressions (groups): Splitting phone numbers into their separate parts." kata
      • 2 years ago

      I'm confused about what our function is supposed to return -- phone numbers that are valid or the regex pattern used to match them?

    • Custom User Avatar
      • LevisFelis
      • created an issue for "Regular Expressions (groups): Splitting phone numbers into their separate parts." kata
      • 3 years ago

      Looks like there are not enough tests for the numbers that start with region code.
      Namely, '0034 567890' and '34 567890' should not yield a match.
      Most of the published solutions fail on these examples.
      hkmt and friends are the only ones who nailed it. All glory to them!

      ' 034 567890' (with a leading space) probably should yield a match (there were tests with a leading space before the country code that were supposed to yeald a match).
      This one fails for all published solutions. Including mine :)

      Also, some of the published solutions fail on '0012 34 567890'.
      How on earth could they be submitted in the first place?

    • Custom User Avatar
      • danomois
      • commented on "Regular Expressions (groups): Splitting phone numbers into their separate parts." kata
      • 3 years ago

      Helral - bruh - how do you sleep at night.
      This was amazing - thank you.
      I thought - prior to today - that I was getting good at regex.

    • Custom User Avatar
      • phocaman
      • commented on "Regular Expressions (groups): Splitting phone numbers into their separate parts." kata
      • 3 years ago

      Thanks.

    • Custom User Avatar
      • Chrono79
      • commented on "Regular Expressions (groups): Splitting phone numbers into their separate parts." kata
      • 3 years ago

      The first one has 5 digits instead of 6, and the other has only two digits and no leading 0:

      These phone numbers can be split up into a nation code (without prefix), an area code with 2 digits (with the leading 0 if it's at the beginning of the whole number) and the local number with 6 digits.

      The nation code, area code and local number may never contain a 0 at the start unless it is the prefix for dialing out of the country or it is at the beginning of the area code if there is no country code.

    • Custom User Avatar
      • phocaman
      • commented on "Regular Expressions (groups): Splitting phone numbers into their separate parts." kata
      • 3 years ago

      Why '67890' and '04 567890' should not be a match? These phone numbers seem to be valid according to the instructions.

    • Custom User Avatar
      • avermakov
      • commented on "Regular Expressions (groups): Splitting phone numbers into their separate parts." kata
      • 3 years ago

      I must admit this was a bit sadistic :)

    • Custom User Avatar
      • farhanaditya
      • commented on "Regular Expressions (groups): Splitting phone numbers into their separate parts." kata
      • 4 years ago

      Updated the description to mention this

    • Custom User Avatar
      • sid114
      • commented on "Regular Expressions (groups): Splitting phone numbers into their separate parts." kata
      • 4 years ago

      great kata

    • Custom User Avatar
      • FArekkusu
      • created an issue for "Regular Expressions (groups): Splitting phone numbers into their separate parts." kata
      • 4 years ago

      There should be tests with nation code but no area code.

    • Custom User Avatar
      • Awesome A.D.
      • commented on "Regular Expressions (groups): Splitting phone numbers into their separate parts." kata
      • 4 years ago

      There's a comment about this buried somewhere below, I'll state it explicitly because the description doesn't:

      The local number has to be exactly 6 digits long.

    • Loading more items...
    • © 2025 Codewars
    • About
    • API
    • Blog
    • Privacy
    • Terms
    • Code of Conduct
    • Contact

    Confirm

    • Cancel
    • Confirm

    Collect: undefined

    Loading collection data...