<?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: getDelimitedField when delimiter is a \ in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/getDelimitedField-when-delimiter-is-a/m-p/238186#M199997</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/525/mclarke.html" nodeid="525"&gt;@Matt Clarke&lt;/A&gt; thank you, it works.&lt;/P&gt;&lt;P&gt;Just in case somebody needs it I managed to make it work using getDelimitedField&lt;/P&gt;&lt;PRE&gt;log_source:getDelimitedField(3, '\\', '"', '~')}&lt;/PRE&gt;</description>
    <pubDate>Thu, 11 Apr 2019 05:43:59 GMT</pubDate>
    <dc:creator>jiglesias</dc:creator>
    <dc:date>2019-04-11T05:43:59Z</dc:date>
    <item>
      <title>getDelimitedField when delimiter is a \</title>
      <link>https://community.cloudera.com/t5/Support-Questions/getDelimitedField-when-delimiter-is-a/m-p/238184#M199995</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have an attribute log_source that holds a path like D:\dir1\dir2\dir3&lt;/P&gt;&lt;P&gt;I need to get only dir2 but I'm unable to escape the slash with ${log_source:getDelimitedField(3,'\')}&lt;/P&gt;&lt;P&gt;I've tried several things unsuccessfully.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2019 04:15:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/getDelimitedField-when-delimiter-is-a/m-p/238184#M199995</guid>
      <dc:creator>jiglesias</dc:creator>
      <dc:date>2019-04-11T04:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: getDelimitedField when delimiter is a \</title>
      <link>https://community.cloudera.com/t5/Support-Questions/getDelimitedField-when-delimiter-is-a/m-p/238185#M199996</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/113094/jiglesias.html" nodeid="113094"&gt;@Julian Iglesias&lt;/A&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;You can accomplish above using a function chain in your NiFi Expression Language (EL) statement.&lt;/P&gt;&lt;P&gt;Rather then using the getDelimitedField() EL function:&lt;/P&gt;&lt;PRE&gt;${log_source:getDelimitedField(3,'\')}&lt;/PRE&gt;&lt;P&gt;-&lt;BR /&gt;You can successfully do this using the substringAfter() function twice to strip away what is before "dir2" and the substringBefore() function to strip away everything after "dir2":&lt;/P&gt;&lt;PRE&gt;${log_source:substringAfter('\\'):substringAfter('\\'):substringBefore('\\')}&lt;/PRE&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;If you found this answer addressed your question, please take a moment to login in and click the "ACCEPT" link.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2019 05:10:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/getDelimitedField-when-delimiter-is-a/m-p/238185#M199996</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2019-04-11T05:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: getDelimitedField when delimiter is a \</title>
      <link>https://community.cloudera.com/t5/Support-Questions/getDelimitedField-when-delimiter-is-a/m-p/238186#M199997</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/525/mclarke.html" nodeid="525"&gt;@Matt Clarke&lt;/A&gt; thank you, it works.&lt;/P&gt;&lt;P&gt;Just in case somebody needs it I managed to make it work using getDelimitedField&lt;/P&gt;&lt;PRE&gt;log_source:getDelimitedField(3, '\\', '"', '~')}&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Apr 2019 05:43:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/getDelimitedField-when-delimiter-is-a/m-p/238186#M199997</guid>
      <dc:creator>jiglesias</dc:creator>
      <dc:date>2019-04-11T05:43:59Z</dc:date>
    </item>
  </channel>
</rss>

