Exactly! And it's especially useful for things such as IRC where the content of each part changes (for instance the nick of the person speaking) but the restrictions stay the same (it only allows letters and numbers and undercore...and I guess in the case of OmnomIRC also ?)
In that case, you can use regex like something as simple as "</w+>" to capture the name found within < and > in a message.
(In regex, anything followed by + tells it to look for 1 or more of that character/character-group. /w represents the character group [A-Za-z0-9_]).
Obviously that's a very general example, but still