Difference between revisions of "Talk:Documentation/How Tos/Regular Expressions in Calc"

From Apache OpenOffice Wiki
Jump to: navigation, search
m
(Another clever example)
Line 4: Line 4:
 
# I know the section is specific to functions, but I was still confused by the paragraph at the end. I think it would be clearer starting "Note that regular expression searches ''within functions'' are always case insensitive ...", and the words "also seem to" near the end are, to me, superfluous - the structures are simply case insensitive.
 
# I know the section is specific to functions, but I was still confused by the paragraph at the end. I think it would be clearer starting "Note that regular expression searches ''within functions'' are always case insensitive ...", and the words "also seem to" near the end are, to me, superfluous - the structures are simply case insensitive.
 
--[[User:Hgreenhough|Hgreenhough]] 12:46, 8 November 2007 (CET) & 10:06, 12 November 2007 (CET)
 
--[[User:Hgreenhough|Hgreenhough]] 12:46, 8 November 2007 (CET) & 10:06, 12 November 2007 (CET)
 +
 +
 +
Here's another clever example from Villeroy - how to use a regexp in COUNTIF (and presumably the other functions which support regexp) when it has to work across Calc ''and'' Excel:
 +
<pre>Insert > Names > Define... (Ctrl+F3)
 +
Name: AnyCharOrNone
 +
Assigned to: IF(ISERROR(SEARCH(".*";"x"));"*";".*")
 +
[Add], [OK]
 +
Your formula: =COUNTIF(range; "start"&AnyCharOrNone&"end")</pre>
 +
from: http://www.oooforum.org/forum/viewtopic.phtml?t=66093
 +
 +
--[[User:Hgreenhough|Hgreenhough]] 12:43, 23 November 2007 (CET)

Revision as of 11:43, 23 November 2007

I don't want to interfere whilst this is such a young work-in-progress, so I will use Talk to pass on observations on the Regular expressions in Calc functions section.

  1. The example given will only count 'Fred' and 'bride' if "Search criteria = and <> must apply to whole cells" is OFF. If it is ON then only 'red' and 'ROD' are counted.
  2. I know the section is specific to functions, but I was still confused by the paragraph at the end. I think it would be clearer starting "Note that regular expression searches within functions are always case insensitive ...", and the words "also seem to" near the end are, to me, superfluous - the structures are simply case insensitive.

--Hgreenhough 12:46, 8 November 2007 (CET) & 10:06, 12 November 2007 (CET)


Here's another clever example from Villeroy - how to use a regexp in COUNTIF (and presumably the other functions which support regexp) when it has to work across Calc and Excel:

Insert > Names > Define... (Ctrl+F3) 
Name: AnyCharOrNone 
Assigned to: IF(ISERROR(SEARCH(".*";"x"));"*";".*") 
[Add], [OK] 
Your formula: =COUNTIF(range; "start"&AnyCharOrNone&"end")

from: http://www.oooforum.org/forum/viewtopic.phtml?t=66093

--Hgreenhough 12:43, 23 November 2007 (CET)

Personal tools