79113109

Date: 2024-10-22 08:37:09
Score: 0.5
Natty:
Report link

If you only need to test string, and don't need to capture text, the fastest way is:

$(?<!a) // 39 steps

This regex: $ puts cursor to the end of the string and then (?<!a) look (negative) behind.

Check it here https://regex101.com/r/VZ5Aqa/1

Compared with:

.*(?<!a)$ // 66 steps
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Argimko