Calc Guide

Figure 147: Enabling regular expressions in formulas
For example =COUNTIF(A1:A6;"r.d") with Enable regular
expressions in formulas selected will count cells in A1:A6 which
contain red and ROD.
Additionally if Search criteria = and <> must apply to whole cells
is not selected, then Fred, bride, and Ridge will also be counted. If that
setting is selected, then it can be overcome by wrapping the
expression thus: =COUNTIF(A1:A6;".*r.d.*").
Figure 148: Using the COUNTIF function.
Regular expression searches within functions are always case
insensitive, irrespective of the setting of the Case sensitive checkbox
on the dialog in Figure 147—so red and ROD will always be matched in
the above example. This case-insensitivity also applies to the regular
expression structures ([:lower:]) and ([:upper:]), which match
characters irrespective of case.
216 OpenOffice.org 3.x Calc Guide