
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If string contains specific characters then remove them
Hello,
I need help with the most efficient expression to achieve the following. I have a text field that contains the following example text:
.......
LIMIT PRICE (0.0015) DOES NOT MATCH TICK SIZE
LIMIT PRICE (0.0045) DOES NOT MATCH TICK SIZE
LIMIT PRICE (0.035) DOES NOT MATCH TICK SIZE
LIMIT PRICE (0.101) DOES NOT MATCH TICK SIZE
LIMIT PRICE (0.0001) DOES NOT MATCH TICK SIZE
........
I would like to create an expression: IF text contains the words "LIMIT PRICE" then remove the "(#.###)" from the string so it displays LIMIT PRICE DOES NOT MATCH TICK SIZE.
Thanks in advance
Andrew
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Andrew,
Use this, I've named your example Row, so fill in your own field name for Row:
IF(Wildmatch(Row,'*LIMIT PRICE*'),'LIMIT PRICE DOES NOT MATCH TICK SIZE',Row) as Test,
Jordy
Climber

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Andrew,
Use this, I've named your example Row, so fill in your own field name for Row:
IF(Wildmatch(Row,'*LIMIT PRICE*'),'LIMIT PRICE DOES NOT MATCH TICK SIZE',Row) as Test,
Jordy
Climber

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this?
keepchar ( 'field_name','abcdefghijklmnopqrstuvwxyz' )

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OR try this ?
keepchar(field_name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ')

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But if you do that Sameer, also when there are numbers that should be in the row are now deleted. A thing that he probably doesn't want to happen..
Jordy
Climber

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey @JordyWegman ,
But according to the problem statement this works fine and it is an efficient solution.So I think it is a better solution.
With Regards,
Sameer

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is exactly what I was after. Thanks very much and appreciate the quick reply.
