Becoming Femme Loading...
Loading...

Stickam 2crazy14oldchickz1- 32: -ghosty

# Last part should be the number last_part = parts[3] number = None if last_part.isdigit(): number = int(last_part) else: # if the number is attached like '32' at the end of a word, handle separately match = re.search(r'(\d+)$', input_str) if match: number = int(match.group(1)) # remove the number from the room if it was attached if not room: room = input_str.split()[-2]

username = parts[0] platform = parts[1]

It looks like you’re trying to create a feature (possibly a parser, tag extractor, data cleaner, or search filter) for a string like this: -ghosty Stickam 2crazy14oldchickz1- 32

# 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:]) # Last part should be the number last_part

if len(parts) < 4: return {"error": "Not enough parts", "original": input_str} handle separately match = re.search(r'(\d+)$'

# The third part could be the room name (may have digits) room = parts[2]

# Last part should be the number last_part = parts[3] number = None if last_part.isdigit(): number = int(last_part) else: # if the number is attached like '32' at the end of a word, handle separately match = re.search(r'(\d+)$', input_str) if match: number = int(match.group(1)) # remove the number from the room if it was attached if not room: room = input_str.split()[-2]

username = parts[0] platform = parts[1]

It looks like you’re trying to create a feature (possibly a parser, tag extractor, data cleaner, or search filter) for a string like this:

# 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:])

if len(parts) < 4: return {"error": "Not enough parts", "original": input_str}

# The third part could be the room name (may have digits) room = parts[2]

TSPOV
Pure-TS