write a regex that identifies the last 4 digits in a string that are less than 1946
- User
write a regex that identifies the last 4 digits in a string that are less than 1946
Assistant
Here's a regex pattern that matches the last 4 digits in a string that are less than 1946:
code\b(?<!\d)[0-9]{3}(?<!\d)[0-9]{1}(?<!\d)(?<=.\d{4}$)\b
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.