You are not logged in.

Unanswered posts



Important! This site has been replaced. All content here is read-only. Please visit our brand-new community at https://community.talend.com/. We look forward to hearing from you there!



#1 2017-02-10 10:11:17

Nizam HM
Member
14 posts

Nizam HM said:

Replacing special character and non numeric and alphabets in a column

Tags: [development]

Hi All 
I want to remove the special character and alphabets and non-Numeric Record in a particular column lets say mobile no 
EG: Input
Mobile,ID
123,1
123&,2
L.123,3
ABC,4
124,5
?,6
@,7
$,8

First Output should Contain all the 8 record 

Mobile,ID
123,1
      ,2
      ,3
      ,4
124 ,5
      ,6
      ,7
      ,8
Second Output Should be
Mobile,ID
123&,2
L.123,3
ABC,4
?,6
@,7
$,8

How can i do this
I Can able to get the First output  as i Mentioned above and
also i can able to get the second output but not the complete one what output i am getting is 
Mobile,ID
123&,2
L.123,3
ABC,4
but i want the second output i am using T-Map because my scenario is like that

Regards
NJ

Offline

#2 2017-02-10 11:02:40

blescalier
Member
4 posts

blescalier said:

Re: Replacing special character and non numeric and alphabets in a column

Hi,
You can use regular expression
in a tJavaFlex component :

   String var = null;
   var = row<in>.<valuename>;
    p = Pattern.compile("[a-zA-ZÂ]+");//or other character you need;
    m = p.matcher(var);
    var= m.replaceAll("");
row<out>.<valuename> = var;

Offline

#3 2017-02-10 12:13:09

Nizam HM
Member
14 posts

Nizam HM said:

Re: Replacing special character and non numeric and alphabets in a column

Hi 

My Problem is i want to filter it in the tmap only

Offline

Board footer

Talend Contributor Agreement - Talend Website Privacy Policy