Issue 120472 - Search for "." gives wrong position
Summary: Search for "." gives wrong position
Status: CLOSED IRREPRODUCIBLE
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: 3.4.0
Hardware: PC Windows 7
: P3 Critical (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-06 14:45 UTC by Klaus
Modified: 2012-11-13 07:11 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
dot string search function bug example (6.88 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-08-06 14:45 UTC, Klaus
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Klaus 2012-08-06 14:45:10 UTC
Created attachment 78858 [details]
dot string search function bug example

When I search for the string "." into a cell it gives a wrong result.
For example, if the A1 Cell has an IP address, e.g. 10.11.12.13/23, using the following formula/:

=SEARCH(".";A1)

gives as result 1 instead of 3.
Comment 1 Regina Henschel 2012-08-06 14:59:08 UTC
. is a special character in regular expressions. Please read the help about regular expressions and about the function SEARCH.
Make sure, that the settings in Tools > Options > OpenOffice.org Calc > Calculate are as you need them.

Perhaps it is easier for you to use the function FIND?
Comment 2 binguo 2012-11-13 07:11:01 UTC
Verified on Aoo_Trunk_20121109.1800 rev 1407366, “.” is a special character in regular expressions, so user should go to Tools > Options > OpenOffice.org Calc > Calculate, then un-check "Enable regular expressions in formulas" , then "3" will be show as results. so it is not a bug, close it. thanks.