title: Extract text from Nifi attribute
body: <p>I'm listing out all the keys in S3 bucket. Below is the flow.</p>
  
  <p>Here in the keys as part of the filename attribute(<strong>FetchS3Object</strong> attributes) I have the complete path of the keys, out of which I want extract the last but one text</p>
  
  <p>e.g.</p>
  
  <p>If below is the complete path of the key</p>
  
  <p><strong>/buckname/root1/subobject/subsubobject/path1/path2/path3/text.csv</strong></p>
  
  <p>in the file name attribute I have <strong>root1/subobject/subsubobject/path1/path2/path3/text.csv</strong>, out of which I want extract <strong>path2</strong> text.</p>
  
  <p>Any suggestions to extract text from the attributes please.</p>
  
  <p><a href="https://i.stack.imgur.com/pduXM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pduXM.png" alt="enter image description here"></a></p>