if len(parts) < 4: return {"error": "Not enough parts", "original": input_str}
# Pattern explanation: # ^(\w+) -> first word (username) # \s+(\w+) -> second word (platform) # \s+([^\d\s]+) -> alphanumeric room/channel name (no digits at start) # \s+(\d+)$ -> trailing number (age or count) # But given "2crazy14oldchickz1" starts with digit, we adjust:
# The third part could be the room name (may have digits) room = parts[2]
# Fallback: if room contains digits and no separate number, try regex if not number: match = re.search(r'(\d+)$', input_str) if match: number = int(match.group(1)) # Remove trailing number from the string temp = re.sub(r'\s*\d+$', '', input_str) parts_temp = temp.split() if len(parts_temp) >= 3: username = parts_temp[0] platform = parts_temp[1] room = " ".join(parts_temp[2:])
import re def parse_ghosty_feature(input_str: str): # Remove leading/trailing spaces and hyphens cleaned = input_str.strip().strip('-')
"-ghosty Stickam 2crazy14oldchickz1- 32"