<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: regex_replace: access violation in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/regex-replace-access-violation/qaa-p/618248#M150421</link>
    <description>&lt;P&gt;From the top of the stack trace it identifies the issue is with the function call:&lt;/P&gt;
  &lt;P&gt;XFunc_regexreplace::compute()+0589 byte(s)&lt;/P&gt;
  &lt;P&gt;Reviewing the syntax of the regex_replace() function is is correct syntax to omit the &amp;lt;regular expression processing flags&amp;gt;&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://help.sap.com/viewer/8092b085a68941f6aaa6708685a62b0d/4.2.10/en-US/663bf2aa3c154617b92d725cf37ef0b4.html"&gt;https://help.sap.com/viewer/8092b085a68941f6aaa6708685a62b0d/4.2.10/en-US/663bf2aa3c154617b92d725cf37ef0b4.html&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;I was able to reproduce this error however after modifying the call I did not receive the error please use the following syntax:&lt;/P&gt;
  &lt;P&gt;regex_replace(&lt;BR /&gt;'WF_aworkflowname',&lt;BR /&gt;'^WF_(.+)(_\[a-zA-Z0-9\]+){2}$',&lt;BR /&gt;'$1');&lt;/P&gt;
  &lt;P&gt;Regards&lt;/P&gt;
  &lt;P&gt;Bon&lt;/P&gt;</description>
    <pubDate>Wed, 02 May 2018 11:02:15 GMT</pubDate>
    <dc:creator>former_member231328</dc:creator>
    <dc:date>2018-05-02T11:02:15Z</dc:date>
    <item>
      <title>regex_replace: access violation</title>
      <link>https://community.sap.com/t5/technology-q-a/regex-replace-access-violation/qaq-p/618246</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;
  &lt;P&gt;We try to extract the table name from the workflow name. We built a custom function using regex_replace as follows.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;return regex_replace(
    workflow_name(),
    '^WF_(.+)(_\[a-zA-Z0-9\]+){2}$',
    '$1', # replace everything with first group
    null
);&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;This fails with very non descriptive error message as can seen below. How do we fix this?&lt;/P&gt;
  &lt;P&gt;Kind regards&lt;/P&gt;
  &lt;P&gt;Thiemo&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;8104    6852    SYS-170101   13/04/2018
14:08:18  |Session BJ_HEñVISIT_LZ_INI|Work
flow WF_HEñVISIT_LZ_INI

8104    6852    SYS-170101   13/04/2018
14:08:18  System Exception
&amp;lt;ACCESS_VIOLATION&amp;gt; occurred. Process dump option is off. Process is not
dumped.

8104    6852    SYS-170101   13/04/2018
14:08:18  Call stack:

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000F19EF9DD,
XFunc_regexreplace::compute()+0589 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000F19D15FE,
XCall_expr::compute()+0446 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000F19D1E78,
XVal_call::compute()+0024 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000F19D1EDB,
XVal_cast::compute()+0091 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000F19D6831,
XStep_return::execute()+0065 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000F19D68DD,
XStep_sblock::execute()+0061 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000F1A0AC3D,
XFunc_script::compute()+0333 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000F1A0AF2A,
XFunc_script::compute()+0490 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000F19D15FE,
XCall_expr::compute()+0446 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000F19D1E78,
XVal_call::compute()+0024 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000F19D15A4,
XCall_expr::compute()+0356 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000F19D6115,
XStep_call::execute()+0117 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000F19D68DD, XStep_sblock::execute()+0061
byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000F19DB1D3,
XPlan_spec::execute()+0419 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000F19DF671,
XPlan_desc::execute()+0737 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000F19DACCB,
XPlan_spec::compute()+0923 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000F19DAF43,
XPlan_spec::compute()+0339 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000F19D15FE,
XCall_expr::compute()+0446 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000F19D6115,
XStep_call::execute()+0117 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000F19D68DD,
XStep_sblock::execute()+0061 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000F19DB1D3,
XPlan_spec::execute()+0419 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000F19DF671,
XPlan_desc::execute()+0737 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000F19DACCB,
XPlan_spec::compute()+0923 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000F19DAF43,
XPlan_spec::compute()+0339 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000F0B1AE61,
AE_Main_Process_Options()+64241 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000F0B4A315,
AE_Main()+2869 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000CD808167

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000CD809C1B

8104    6852    SYS-170101   13/04/2018
14:08:18  0x00000000CD80A729

8104    6852    SYS-170101   13/04/2018
14:08:18  0x000000000AB113D2,
BaseThreadInitThunk()+0034 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  0x000000000AC654F4,
RtlUserThreadStart()+0052 byte(s)

8104    6852    SYS-170101   13/04/2018
14:08:18  Registers:

8104    6852    SYS-170101   13/04/2018
14:08:18  RAX=0000000000000000  RBX=0000000021A88510  RCX=00000000F27BA5F0  RDX=000000001E1C7720  RSI=000000001FC8D670

8104    6852    SYS-170101   13/04/2018
14:08:18  RDI=0000000021C5F090  RBP=000000001D5C4F70  RSP=000000001D5C4E70  RIP=00000000F19EF9DD  FLG=0000000000010206

8104    6852    SYS-170101   13/04/2018
14:08:18  R8=000000001FC8D670   R9=000000001FC8E930  R10=000000001FC03364  R11=000000001FC7C214  R12=0000000000000000

8104    6852    SYS-170101   13/04/2018 14:08:18  R13=000000001FC8E930 
R14=000000001FC8E930 
R15=00000000AAAAAAAB

8104    6852    SYS-170101   13/04/2018
14:08:18  Exception code: C0000005
ACCESS_VIOLATION

8104    6852    SYS-170101   13/04/2018 14:08:18  Fault address: 
00007FFAF19EF9DD 01:00000000010BE9DD D:\SAP BusinessObjects\Data
Services\bin\acta.dll&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 13 Apr 2018 12:39:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/regex-replace-access-violation/qaq-p/618246</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-04-13T12:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: regex_replace: access violation</title>
      <link>https://community.sap.com/t5/technology-q-a/regex-replace-access-violation/qaa-p/618247#M150420</link>
      <description>&lt;P&gt;Incident 215526/2018 was opened therefor.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 14:28:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/regex-replace-access-violation/qaa-p/618247#M150420</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-04-27T14:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: regex_replace: access violation</title>
      <link>https://community.sap.com/t5/technology-q-a/regex-replace-access-violation/qaa-p/618248#M150421</link>
      <description>&lt;P&gt;From the top of the stack trace it identifies the issue is with the function call:&lt;/P&gt;
  &lt;P&gt;XFunc_regexreplace::compute()+0589 byte(s)&lt;/P&gt;
  &lt;P&gt;Reviewing the syntax of the regex_replace() function is is correct syntax to omit the &amp;lt;regular expression processing flags&amp;gt;&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://help.sap.com/viewer/8092b085a68941f6aaa6708685a62b0d/4.2.10/en-US/663bf2aa3c154617b92d725cf37ef0b4.html"&gt;https://help.sap.com/viewer/8092b085a68941f6aaa6708685a62b0d/4.2.10/en-US/663bf2aa3c154617b92d725cf37ef0b4.html&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;I was able to reproduce this error however after modifying the call I did not receive the error please use the following syntax:&lt;/P&gt;
  &lt;P&gt;regex_replace(&lt;BR /&gt;'WF_aworkflowname',&lt;BR /&gt;'^WF_(.+)(_\[a-zA-Z0-9\]+){2}$',&lt;BR /&gt;'$1');&lt;/P&gt;
  &lt;P&gt;Regards&lt;/P&gt;
  &lt;P&gt;Bon&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2018 11:02:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/regex-replace-access-violation/qaa-p/618248#M150421</guid>
      <dc:creator>former_member231328</dc:creator>
      <dc:date>2018-05-02T11:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: regex_replace: access violation</title>
      <link>https://community.sap.com/t5/technology-q-a/regex-replace-access-violation/qaa-p/618249#M150422</link>
      <description>&lt;P&gt;Sorry for getting back to this so late. I had quite a bit a hassle to correctly understand Bons answer which is perfectly correct. The point is that I used the fourth parameter providing it with &lt;EM&gt;null&lt;/EM&gt; value which leads to the mentioned error. If you use the emtpy string '' or just omit the fourth Parameter, the error is gone.&lt;/P&gt;
  &lt;P&gt;I thought, Bon would refer to the regex syntax, but maybe he referred to use of regex_replace.&lt;/P&gt;
  &lt;P&gt;Sadly, the regular does not what I intend it to do. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 08:31:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/regex-replace-access-violation/qaa-p/618249#M150422</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-06-11T08:31:09Z</dc:date>
    </item>
  </channel>
</rss>

