Thank you for this response. Indeed, enclosing the named class in parentheses (e.g. "([:digit:])") solves the problem. Enclosing it in another set of brackets (e.g. "[[:digit:]]") does nothing good for me.
I would be satisfied if Help were changed to include the parentheses though I don't fully understand why they work or for that matter why they should be needed. -- Jim TerryJ wrote at 17:11 on 16 Jan 2007: > > > James E. Lang-2 wrote: > > > > References: OOo's help regarding the COUNTIF() function and OOo's flavor > > of > > regular expressions in analyzing this problem. > > > > Cell A1 contains the text string "B1=7" > > > > According to my understanding of the information in the regular expression > > help, the following is true. > > > > * [:digit:] represents a single digit. > > * [:alpha:] represents a single alphabetic character. > > * + accepts one or more of the prior token. > > * * accepts zero or more of the prior token. > > * The other characters in my search mask represent themselves. > > > > Here are several forms of a formula and their results. As I read the > > regular > > expression help, all of them should have succeeded. There is no reason > > that I > > see why any of them should succeed if the first one fails. > > > > =COUNTIF(A1;"b1=[:digit:]") is zero (failure) > > > > =COUNTIF(A1;"b1=[:digit:]*") is one (success) > > > > =COUNTIF(A1;"b1=[:digit:]+") is one (success) > > > > =COUNTIF(A1;"b1=[:digit:][:alpha:]*") is one (success) > > > > I don't understand why the one failed while the other succeeded. To > > further > > analyze the situation I tried each of the following five formulae. > > > > =LEN(A1) is four (correct) > > > > =MID(A1;1;1) is "B" (correct) > > > > =MID(A1;2;1) is "1" (correct) > > > > =MID(A1;3;1) is "=" (correct) > > > > =MID(A1;4;1) is "7" (correct) > > > > -- > > Jim > > > > > > This issue may shed some light: > http://www.openoffice.org/issues/show_bug.cgi?id=64368 > > On the other hand, it may shed darkness. > > Cheers. > -- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
