Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Can you please help me to remove the bracket values present in the data set where inside the bracket() remove all the information along with bracket and replace with . dot.
Example:
Data field
Field1.
My name is (0000) Gowtham
Output should be
Field1.
My name is . Gowtham
Thanks,
Gowtham
Datafield:
Load *,
TextBetween(Field1,'(',')') as Text1,
Replace(Field1, '('&TextBetween(Field1,'(',')')&')', '.') as RequiredText;
Load * Inline
[
Field1
My name is (0000) Gowtham
];
REPLACE(Field1, '(0000)', '.')
Hi
Try the below calculation it will work for specific scenario
Left(ctext,Index(ctext,'(')-1)&'.'& Right(ctext,(len(ctext)-Index (ctext,')')-1))
Thanks
Datafield:
Load *,
TextBetween(Field1,'(',')') as Text1,
Replace(Field1, '('&TextBetween(Field1,'(',')')&')', '.') as RequiredText;
Load * Inline
[
Field1
My name is (0000) Gowtham
];
Man I doubt that people here have recommended a lots of solution and there is no single reply from you.
This will remove only one (000).
In my case few row as like
Field1.
row1 : My name is (0000) Gowtham
row2 : My name is (0000) Gowtham ,My name is (0001) Gowtham,My name is (0002) Gowtham,My name is (0002)
row2 is not removing multiple brackets
inside the brackets random numbers are there
This will remove only one (000).
In my case few row as like
Field1.
row1 : My name is (0000) Gowtham
row2 : My name is (0000) Gowtham ,My name is (0001) Gowtham,My name is (0002) Gowtham,My name is (0002)
row2 is not removing multiple brackets
inside the brackets random numbers are there
Datafield:
Load *,
TextBetween(Field1,'(',')') as Text1,
Replace(Field1, '('&TextBetween(Field1,'(',')')&')', '.') as Text2,
Replace(Replace(Replace(Field1, '('&TextBetween(Field1,'(',')',1)&')', '.'), '('&TextBetween(Field1,'(',')',2)&')', '.'), '('&TextBetween(Field1,'(',')',3)&')', '.') as RequiredText,
;
Load * Inline
[
Field1
My name is (0000) Gowtham
'My name is (0000) Gowtham ,My name is (0001) Gowtham,My name is (0002) Gowtham,My name is (0002)'
];
try this.
Between () always digit?
If so, try:
Load Replace(PurgeChar(Field1,'0123456789'),'()','.') As Field1;
Load * Inline
[
Field1
My name is (0000) Gowtham
'My name is (0000) Gowtham ,My name is (0001) Gowtham,My name is (0002) Gowtham,My name is (0002)'
];
Load Replace(Field1,'()','.') As Field1;
Load PurgeChar(Field1,'([0][1][2][3][4][5][6][7][8][9])') as Field1;
Load * Inline
[
Field1
My name is (0000) Gowtham
'My name is (0000) Gowtham ,My name is (0001) Gowtham,My name is (0002) Gowtham,My name is (0002)'
];
Does PurgeChar function considers/recognizes regular expression.?
Above seems to work. It replaces all the integers between ()
Thanks
Nagesh