regular expression to find all cell addresses in string
Posted
by Nike
on Stack Overflow
See other posts from Stack Overflow
or by Nike
Published on 2010-03-31T00:06:47Z
Indexed on
2010/03/31
0:13 UTC
Read the original article
Hit count: 627
I have a string which may contain cell address, which is look like:
A1, B34, Z728 - only capital letters and
AA3, ABA92, ZABC83 - there may be several letters before Integer number.
The typical source string is look like:
=3+7*A1-B3*AB28
I need to get collection of all cells in the string: A1, B3, AB28
I tried to use Regex.Matches method with the following regular expression: @"[A..Z]+?[1..9]+?", but it doesn't work.
Can anybody help me to write the regular expression?
© Stack Overflow or respective owner