Write regex that finds a line containing "SAMPLE TEXT", whole line
- User
Write regex that finds a line containing "SAMPLE TEXT", whole line
Assistant
To match a whole line that contains exactly the text "SAMPLE TEXT", you can use the following regular expression:
^SAMPLE TEXT$
Explanation:
^— Anchors the match to the start of the line.SAMPLE TEXT— Matches the exact string "SAMPLE TEXT".$— Anchors the match to the end of the line.
This ensures that the entire line is exactly "SAMPLE TEXT", with no extra characters before or after.
Example Matches:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.