<?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>topic Re: regexp_extract Error when put { in pattern in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/regexp-extract-error-when-put-in-pattern/m-p/41006#M27280</link>
    <description>&lt;P&gt;what do you want to achieve with the curly brace?&amp;nbsp; It is a regex character so you can't just add it.&lt;BR /&gt;If you want to match on it, you should escape it and perhaps even put it within the quotes.&lt;BR /&gt;You can always test your regex in online tools like regex101 or regexr or ... very handy&lt;/P&gt;</description>
    <pubDate>Tue, 22 Aug 2023 14:23:01 GMT</pubDate>
    <dc:creator>-werners-</dc:creator>
    <dc:date>2023-08-22T14:23:01Z</dc:date>
    <item>
      <title>regexp_extract Error when put { in pattern</title>
      <link>https://community.databricks.com/t5/data-engineering/regexp-extract-error-when-put-in-pattern/m-p/40983#M27274</link>
      <description>&lt;P&gt;HI guys,&lt;/P&gt;&lt;P&gt;I tried to use the regex_extract but when I put &lt;STRONG&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;/STRONG&gt; in pattern I received error&lt;/P&gt;&lt;LI-CODE lang="python"&gt;display(
    df_containerlog.withColumn('reg', regexp_extract(col('LogEntry'), "((^.*))({'data':)", 1))
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="error-regex.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/3233i681222211699F04B/image-size/large?v=v2&amp;amp;px=999" role="button" title="error-regex.png" alt="error-regex.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;have any idea&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 13:33:52 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/regexp-extract-error-when-put-in-pattern/m-p/40983#M27274</guid>
      <dc:creator>William_Scardua</dc:creator>
      <dc:date>2023-08-22T13:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: regexp_extract Error when put { in pattern</title>
      <link>https://community.databricks.com/t5/data-engineering/regexp-extract-error-when-put-in-pattern/m-p/41006#M27280</link>
      <description>&lt;P&gt;what do you want to achieve with the curly brace?&amp;nbsp; It is a regex character so you can't just add it.&lt;BR /&gt;If you want to match on it, you should escape it and perhaps even put it within the quotes.&lt;BR /&gt;You can always test your regex in online tools like regex101 or regexr or ... very handy&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 14:23:01 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/regexp-extract-error-when-put-in-pattern/m-p/41006#M27280</guid>
      <dc:creator>-werners-</dc:creator>
      <dc:date>2023-08-22T14:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: regexp_extract Error when put { in pattern</title>
      <link>https://community.databricks.com/t5/data-engineering/regexp-extract-error-when-put-in-pattern/m-p/41013#M27281</link>
      <description>&lt;P&gt;Hello William,&lt;/P&gt;&lt;P&gt;You have to escape the &lt;STRONG&gt;{ &lt;/STRONG&gt;as it is a special char in case of regex.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"((^.*))(\{'data':)"&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 22 Aug 2023 14:37:49 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/regexp-extract-error-when-put-in-pattern/m-p/41013#M27281</guid>
      <dc:creator>Amine</dc:creator>
      <dc:date>2023-08-22T14:37:49Z</dc:date>
    </item>
  </channel>
</rss>

