Regular expression to capitalize every word. Answer in this json format:…
- User
Regular expression to capitalize every word. Answer in this json format: {"find":"/regex/", "replace":"regex"}
Assistant
{ "find": "\b\w", "replace": "\U$0" }
Explanation:
- "\b\w" is the regular expression that matches any word character (equivalent to [a-zA-Z0-9_]) at the beginning of a word (word boundary).
- "\U0" to reference the entire match.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.