Skip to main content
Hi all,

 

I have a field with the numberic part of an address. I would like to replace the last 2 digits with XX and combine it with the beginning part. I have gotten as far as using the SubstringExtractor to extract the last 2 characters, but how can I combine it with the first part?

 

 

Examples

 

I have:

 

123

 

12345

 

 

Need it to be:

 

1XX

 

123XX

 

 

What does the transformer do with the part of the string that doesn't get extracted???

 

 

Thanks!

 

 

 

If you just want to replace those last two to XX, then use the StringReplacer change "use regular expression" to Yes and text to match is ..$ and replacement text is XX.
Thank you tdavis! Works perfectly! 

 

 

Maybe you can help me with the StringSearcher transformer. I have my matched and notMatched. What is the attribute name to expose to put the notMatched records into another attribute?

Reply