<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:erack@redhat.com" title="Eike Rathke <erack@redhat.com>"> <span class="fn">Eike Rathke</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - SEARCH function of Calc called via the FunctionAccess service does not apply HOST-USE-REGULAR-EXPRESSIONS if true."
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=112404">bug 112404</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>UNCONFIRMED
           </td>
           <td>NEW
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Component</td>
           <td>BASIC
           </td>
           <td>Calc
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Ever confirmed</td>
           <td>
                
           </td>
           <td>1
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - SEARCH function of Calc called via the FunctionAccess service does not apply HOST-USE-REGULAR-EXPRESSIONS if true."
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=112404#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - SEARCH function of Calc called via the FunctionAccess service does not apply HOST-USE-REGULAR-EXPRESSIONS if true."
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=112404">bug 112404</a>
              from <span class="vcard"><a class="email" href="mailto:erack@redhat.com" title="Eike Rathke <erack@redhat.com>"> <span class="fn">Eike Rathke</span></a>
</span></b>
        <pre>This seems to be related to the new default being Wildcards instead of Regexp,
for Excel compatibility (see
<a href="https://wiki.documentfoundation.org/ReleaseNotes/5.3#Option_settings">https://wiki.documentfoundation.org/ReleaseNotes/5.3#Option_settings</a>). The
scratch environment in which the function call is executed is initialized with
default options, not configuration options, to have the same default behaviour
through API calls.

You can easily force regular expressions by setting the corresponding
RegularExpressions property of the
com.sun.star.sheet.SpreadsheetDocumentSettings service exposed by the
com.sun.star.sheet.FunctionAccess service, i.e. in the attached document's case
a simple

fa.RegularExpressions = 1

does it, it overrides the Wildcards property, see also
<a href="https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1sheet_1_1SpreadsheetDocumentSettings.html#a04e61cf6d299d96820ace9b67d2acedb">https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1sheet_1_1SpreadsheetDocumentSettings.html#a04e61cf6d299d96820ace9b67d2acedb</a>

We maybe could merge this setting from the current document where the macro is
executed, but that would need detection first whether the property was already
set via the service to not override that one..

Explicitly setting the property nevertheless is the cleaner approach if you
know the function should handle regexp as in this case.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>