Lua pattern matching

How can I pattern match either “b/” or “BUG=” with a single pattern?

Lua pattern matching does not support alternation.

Context: working on an nvim-cmp source


I don’t think you can do it with Lua pattern matching. You will have to do :match() twice.
You can use vim.regex() which can use alternation.

You can’t. The commonly suggested solution is to use multiple patterns.