Skip to content

Instantly share code, notes, and snippets.

@tapir
Created December 17, 2015 09:48
Show Gist options
  • Save tapir/a93534476565f2bdc1fd to your computer and use it in GitHub Desktop.
Save tapir/a93534476565f2bdc1fd to your computer and use it in GitHub Desktop.
str = "testtesttest<!--m-->testtesttest"
local s, e = string.find(str, "<!--", 0)
print(s, e)
local s, e = string.find(str, "<!--m", 0)
print(s, e)
-- Output:
-- 13, 15
-- nil, nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment