mIRC Homepage
Posted By: rob444 Regex help - 11/05/13 07:14 PM
Hello there!

I've read up a bit on regular expressions and I am trying to do a pretty straight forward and simple expression but I can't seem to get it to work properly.

Basically, I want it to find the word "boat" at the end, this can be done using the $ sign. However, if someone says "Can I borrow your boat?", it won't trigger at all. So I've been sitting here trying to solve it but I just can't see the solution.
To the point: I really want it to match boat or boat? at the end of the substring.

I'd appreciate some help frown!


And I've tried searching the forum by the way :P.
Posted By: 5618 Re: Regex help - 11/05/13 07:47 PM
In its simplest form this would be
/boat\??$/
Posted By: Tomao Re: Regex help - 11/05/13 09:33 PM
Or:
Code:
/.+(?=boat\b)/iS
The beginning of a sentence ending with the word boat.
Posted By: rob444 Re: Regex help - 14/05/13 06:12 AM
Thank you! smile
© mIRC Discussion Forums