Support Questions

Find answers, ask questions, and share your expertise

Domain of URL - NiFi

New Contributor

greetings, 

 

are their any processor in NiFi will help me in extracting the domain of a url?

 

thanx in advance

1 REPLY 1

Super Collaborator

Hi,

 

Can you give an example? I think if the url in the flowfile content you can use ExtractText processor where you can create dynamic property and use regex to extract the pattern you need. If the url in an attribute then you can use UpdateAttribute where you can also create dynamic property and use Expression Language function like find(regex) to extract the domain for a given attribute. Example  ${FullUrl.find(regex)}. To set the regex for finding domain from url, checkout this link:

https://regex101.com/r/jN6kU2/1

 

 

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.