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. -- View this message in context: http://www.nabble.com/Regex-in-OOo-Calc-tf3023094.html#a8402752 Sent from the openoffice - users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
