#### prograplex

##### New Member

- Joined
- May 21, 2014

- Messages
- 6

I am trying to use RegExp in VBA to find all named ranges in a formula.

To find it, I'm basically looking for a string that doesn't end with a ( and that is only made up of a-z, A-Z, 0-9, \, _.

I'm a bit confused about atomic groups and look arounds. As far as I understand it:

strPattern = "[^=]((?!\()[a-zA-Z0-9\\_])*"

will ignore the = sign at the start of the formula, then look ahead for an open bracket, and if there isn't one, it will collect all the relevant characters. If there is an open bracket however, it ignores everything left of the open bracket.

This isn't working as I though and I don't understand why.

Any help would be greatly appreciated.

Thanks.