I have a feature suggestion that I want to discuss to see if I'm the
only one that think this is a good idea or not. I'm not sure I write
to the right list though, but I couldn't find a discuss list for
LibreOffice, I only found one for discussing the Document Foundation…
Anyway, as you all know, at least those of you who use regular
expressions in Calc now and then, there is this [::] syntax for
finding some specific kinds of strings, such as [:almum:] for finding
a letter or a number, [:digit:] for finding a number and so on.
My suggestion is to add two more of those, something like (feel free
to suggest other names for them):
[:cellref:]
[:rangeref:]
[:cellref:] would find things like A1, $A$1, AB$125 and so on. I
believe this expression is equivalent:
\<\$?[:alpha:]{1,2}\$?[:digit:]{1,7}\>
At least it seems to work in my tests.
[:rangeref:] would find references for cell ranges, such as A1:B5,
X$3:$AT$32658 and so on. Currently I guess you need to search for
something like:
\<\$?[:alpha:]{1,2}\$?[:digit:]{1,7}\>:\<\$?[:alpha:]{1,2}\$?[:digit:]{1,7}\>
What do you think about this?
I can see some complications, though: This would only work with the
”Calc A1” setting in Tools → Options… → LibreOffice Calc → Formula →
Formula Syntax. For example, it would be complicated to find something
like A:A, which is valid with the Excel A1 syntax:
\<\$?[:alpha:]{1,2}\$?[:digit:]{0,7}\>:\<\$?[:alpha:]{1,2}\$?[:digit:]{0,7}\>
This would find A:A, but also A1:A and A:A1, which I don't think is a
valid syntax… But still, most people use the Calc A1 syntax, don't
they?
Also I didn't include syntax like MyTable.A1:B5 and more, but maybe
that can be done easily. Also references to cells and cell ranges
other files could perhaps be included.
Kind regards
Johnny Rosenberg
ジョニー・ローゼンバーグ
--
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
Context
- [libreoffice-users] Calc regular expression – Cell reference suggestion · Johnny Rosenberg
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.