
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Replace multiple char in String
Hello Community
i have the table bellow and i want to remove those words 'STE' 'SARL' 'SA' existing in the Start and end of field RAISON_Sociale
i tried 'MapSubString' but in case of the last word 'SA SARLPOK' the result became POK and i want it to Be 'SARLPOL'
Thank you so much for the help
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Perhaps something like this:
If(Match(SubField([RAISON_SOCIALE],' ',1),'SA','SARL','STE'), Mid([RAISON_SOCIALE],Index([RAISON_SOCIALE],' ')+1),[RAISON_SOCIALE])
talk is cheap, supply exceeds demand

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Perhaps something like this:
If(Match(SubField([RAISON_SOCIALE],' ',1),'SA','SARL','STE'), Mid([RAISON_SOCIALE],Index([RAISON_SOCIALE],' ')+1),[RAISON_SOCIALE])
talk is cheap, supply exceeds demand


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think it might be solvable with mapsubstring by using multiple statements for your adjustments. This means something like to replace 'SARL' at first with an unique char like chr(1) and then checking to chr(1) & 'POK' and replacing it with 'SARLPOK' again and afterwards the chr(1) will be also replaced.
I'm not sure if it could be done within a single mapsubstring - in this case the order of the statements would be important - but with multiple mapsubstrings maybe applied with a chain of preceeding loads it should be possible.
- Marcus

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
it works Thank you so Much

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What if i want to delete the same words from the right side cause this one works only in the left ?
thank u for ur heelp

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If(Match(SubField([RAISON_SOCIALE],' ',-1),'SA','SARL','STE'), Left([RAISON_SOCIALE],Index([RAISON_SOCIALE],' ',-1)+1),[RAISON_SOCIALE])
talk is cheap, supply exceeds demand
