Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extracting first word of no fixed length from a string

Status
Not open for further replies.

PrintScaffold

Mechanical
Sep 8, 2006
453
Greetings all!

I wonder if it is possible to extract a first word from a string? For example: "Steel Hardened Polished Blah Blah" would should return "String". The problem is that word can be different and it's length is not fixed. Otherwise I would use SUBSTRING function. Any ideas?
 
Replies continue below

Recommended for you

It's ok. I have came up with a workaround: length(splitstring(<string>,"")) returns the length of the string.
 
Actually I was thinking of something along those lines but just hadn't tried it yet. This is what I've always liked about UG/NX, it's built well enough that you can often force it to give you what you want without fear of abusing it to badly ;-)

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.
 
Me, too!

If that east coast software I use was 3/4 as robust as UG/NX, my life would be a lot easier!



"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor