Rabbitt Posted November 16, 2006 Posted November 16, 2006 I am trying to work out how to extract characters from a text string and paste them into separate fields from a calculation. The field data I am working with is 00:0D:93:6C:0C:7C which is actually a MAC, I want to extract each section into it's own field eg, 00 into field 1 0D into field 2 93 into field 3 6C into field 4 I can figure out the pasting bit myself, but what I'm struggling with is how to extract each part of the text string using a calculation? Any help is appreciated. Steve
comment Posted November 16, 2006 Posted November 16, 2006 To extract the third section, for example, you could use: Let ( [ newString = Substitute ( yourString ; ":" ; " " ) ] ; MiddleWords ( newString ; 3 ; 1 ) ) No pasting should be required here.
LaRetta Posted November 17, 2006 Posted November 17, 2006 (edited) Hi Michael, It seems that the colon also fits into the word break category along with slash & hypehn then [color:green](Exception Rule #2), ie, it is considered a word break but varies according to the preceding or following character. Could you verify this before I add it to my special rules? So it would be: one:two = 2 words one:2 = 2 words 1:two = 2 words 1:2 = 1 word [color:green]And the comma would fit here as well.. It makes sense since all characters in Exception Rule #2 are date/time/number characters but this could sure bite someone if they don't know about them. I appreciate your posts on the subject ( posts #176047 and #175060 ). LaRetta Edited November 17, 2006 by Guest
comment Posted November 17, 2006 Posted November 17, 2006 Yes. This behavior is common to the comma, the hyphen, the forward slash and the colon.
Rabbitt Posted November 17, 2006 Author Posted November 17, 2006 Thanks for this, it has not only helped me with my query but given me more of an insight into the Let function
Recommended Posts
This topic is 6643 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now