Simple math with regular expressions?

By Roy Osherove In .Net Original

Markdown version

Historical article · Originally published November 8, 2004; technical details may be outdated.

A friend of mine (Ariel) made the bold claim that it is possible to write a regular expression (in today's languages such as .Net) that checks simple mathematical functions, for example if a number is divisible by 3. I looked and looked and asked and checked and could find no mention of this. I'm not talking theoretically; I'm looking for an example that shows me this. Can you provide one?

More in .Net Original

All posts in .Net Original