Skip to main content
Solved

Trim first characters of manz attributes


Hi,

 

 

I have many attributes with len 13. Need to remove first 5 characters of each of them (these 5 can be different).

E.g. att1=1001478577259

 

        att2=1247833654578 and so on.

 

need to get : att1=78577259

 

                       att2=33654578

How to do this without putting multiple SubstringExtractors?

Best answer by takashi

Hi,

 

 

You can use the StringReplacer with regular expression. For example,

 

Attributes: attr1, attr2, ...

 

Text to Match: ^.{5}(.+)$

 

Replacement Text: \\1

 

Use Regular Expressions: Yes

 

 

Takashi
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.

2 replies

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • Best Answer
  • August 13, 2014
Hi,

 

 

You can use the StringReplacer with regular expression. For example,

 

Attributes: attr1, attr2, ...

 

Text to Match: ^.{5}(.+)$

 

Replacement Text: \\1

 

Use Regular Expressions: Yes

 

 

Takashi

  • Author
  • August 13, 2014
Takashi,

 

 

Great thanks.

 

 

Aleksandar

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