this API searches inside a piece of text for a pattern, and returns the first result. You can search for just another string: hello / ell -> 1-4 you can also use "metacharacters" in your patterns for a more complicated search: . = any character + = 1 or more of the last character \ makes the next character not special (so \* actually searches for a * character)
Regular Expressions (sometimes abbreviated to RegEx or RegExp) are a system of matching substrings within larger text strings, formally defined by mathematician Stephen Kleene in the 50's and popularized by their integration into UNIX utilities. My first stab at this used the Thompson NFA approach, which I apparently structured wrong because it took an exponentially long time generating state machines. So no more of that. NOTES • .+ won't work. Just don't do it. I'll figure that out later if people really want it. CRED • Case detection a la @TheLogFather