Regular Expressions 101

Community Patterns

Parse powers of string

1

Regular Expression
ECMAScript (JavaScript)

/
(\w)\^(\d)
/
gm

Description

When you want to parse a litteral math expression with power in and you want e^x to be e**x Use this regex!

Submitted by anonymous - 3 years ago