79611475

Date: 2025-05-07 22:30:19
Score: 1
Natty:
Report link

You want to match either the start of the string ^ or after any newline \n character:

mystr:match("^(%#+)") or mystr:match("\n(%#+)")

I don't think you can combine it into one match. Logical 'or' in Lua patterns?

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • High reputation (-1):
Posted by: Mikael Öhman