Skip to main content
Solved

RegEx for null or empty attributes

  • November 15, 2012
  • 4 replies
  • 2809 views

Forum|alt.badge.img
What RegEx can I use to define null or empty attributes in StringReplacer? Or do I even need to use RegEx? I'm trying to replace null/empty attributes with UNKNOWN. Seems simple enought but it's giving me fits.

Best answer by casey

Both suggestions work great! Thank you for the quick responses.

 

View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

Forum|alt.badge.img
  • November 15, 2012
You can use a Tester and set the the operation to Attribute Is Null followed by AttributeSetter

 

 

-Sean

Forum|alt.badge.img+4
  • November 16, 2012
A Tester->AttributeSetter would work as Sean suggested.

 

 

Be aware that there's an al-in-one NullAttributeReplacer transformer that likewise performs what you are after.

 


Forum|alt.badge.img
  • Author
  • Best Answer
  • November 16, 2012
Both suggestions work great! Thank you for the quick responses.

 


fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • November 18, 2012
To answer the original question, an expression of "^$" (without the quotes) should match an empty string. It sounds like the NullAttributeReplacer might be more appropriate here, though. 

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings