Database

[{"key":1,"message":"asdfff #lol blah blah blah hellohellohellohello",},{"key":2,"message":"#lol asdfff blah blah blah byebyebye"},{"key":3,"message":"asdfff asdffasfdah blah blah #lol hello"},{"key":4,"message":"asdfff #l blah blah blah hello"},{"key":5,"message":"asdfff #lo blah blah blah hello"}]

Query

db.collection.aggregate([{$match:{"message":{/** put your query in $regex option*/$regex:"#l(?![a-zA-Z])",}}}])

Result