How to match parameter names in an expression?

Posted by burak ozdogan on Stack Overflow See other posts from Stack Overflow or by burak ozdogan
Published on 2010-03-14T12:35:41Z Indexed on 2010/03/14 13:15 UTC
Read the original article Hit count: 140

Filed under:
|
|

Hi,

I have a set of expressions representing some formula with some parameters inside. Like:

[parameter1] * [parameter2] * [multiplier]

And many others like this.

I want to use a regular expression so that I can get a list of strings (List<string>) which will have the following inside:

  • [paramter1]
  • [paramter2]
  • [multiplier]

I am not using regular expressions so often; if you have already used something like this I would appreciate if you can share.

Thanks!

© Stack Overflow or respective owner

Related posts about regex

Related posts about c#