Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

trim ( off string

Posted on 2007-03-19
4
Medium Priority
?
860 Views
Last Modified: 2008-01-09
Hello Experts,
Can you help me with string manipulation?
I would like to take this string:
English Language(2)
and take of the everything to the right of the parenthesis so the string looks like this:
English Language
I have made a few attemps with no luck.
Any help you can provide would be appreciated.
0
Comment
Question by:shogun5
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 200 total points
ID: 18753603
Try this

Create a frmula
Name - RemoveParen
Formula
Local NumberVar ParenLoc;
ParenLoc := InStr({YourString}, "(");
Left({YourString},ParenLoc-1)

mlmcc
0
 

Author Comment

by:shogun5
ID: 18753645
Yep...that was it!  
Thank you.
Can you explain what is happening with this code:

  Left({YourString},ParenLoc-1)

Thank you.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 18753815
Left(String,Length)

It takes the first length characters of the string.
ParenLoc has the position of the ( so you want the characters upto but not including that one thus the need to subtract 1

mlmcc
0
 

Author Comment

by:shogun5
ID: 18754042
Thank you.
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Loops Section Overview
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question