Page 1 of 1

Basic Math Regex

Posted: 02 Jan 2017, 00:04
by 2lucene7
This was a while ago and I was wondering if someone could help me with a regex if someone asks to do some basic math such as add, subtract, multiply and divide.

Code: Select all

automacro OnePlusOne {
	pubm /(\d+)(\+|-|/|\*)(\d+)/i
	call {
		do c <something>
	}
}

Re: Basic Math Regex

Posted: 04 Jan 2017, 19:40
by SkylorD
On division u should use The "escape".
\/

Cause we have this

/abcd/

And if u dont use this we can close The expression before The time.