November 16, 200619 yr 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
November 16, 200619 yr To extract the third section, for example, you could use: Let ( [ newString = Substitute ( yourString ; ":" ; " " ) ] ; MiddleWords ( newString ; 3 ; 1 ) ) No pasting should be required here.
November 17, 200619 yr 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, 200619 yr by Guest
November 17, 200619 yr Yes. This behavior is common to the comma, the hyphen, the forward slash and the colon.
November 17, 200619 yr Author Thanks for this, it has not only helped me with my query but given me more of an insight into the Let function
Create an account or sign in to comment