Tom may be extracting too much,
This isn't tested code (just off-the-top-of-my-head).
Let ( [
//Get the number of returns from start to the location of "vtitle\">Transmission"
left_text = Left ( text ; Position ( text ; "vtitle\">Transmission" ; 1; 1 );
title_line = PatternCount ( left_text ; "¶" );
//you can combine the next two lines
data_line_number = title_line + 1;
data_line = GetValue ( text ; data_line_number )
//extract the desired text after the
- starting at 5th character and before the second "<"
Middle ( data_line ; 5 ; position ( data_line ; "<" ; 4 ; 1 ) ) - 1 )
HTH (Hope That Helps)
I appreciate the code but the problem is there is no "¶" .
If I capture more text than i need then subsitute out "¶" the returns are still there. So it must be some other invisible character.
What if you do a filter instead of (or combined with) the substitute?
What about using the Filter() function to strip out everything but the characters you want to keep. The alpha-numeric characters as well as the <>/= etc characters? That should also remove the unwanted and invisible returns leaving you with a more predictable string of text to work with.
Just a thought.
That does a great job thank you!
I would still be interested in know what that character is how to remove it more directly.
Any decent HTML text editor should be able to show you any invisible characters - BBEdit or TextWrangler on OS X. Many things on Windows, but I don't do Windows if I can help it.
IIRC, there is a difference between a carriage return and a line feed character. Could be that this is what is causing you grief.
I have just spent 10 minutes trying to change my question to show it has been answered. No idea how to do it, any help??
I think that David's suggestion that you might be dealing with a Line Feed char is apt, and worthy of consideration.
In FileMaker, Char( 10 ) will return a line feed character. This should allow you to deal with them and substitute them out, should you determine that Line Feeds are causing you this issue.
HTH & best,
I'd tell you, but knowing my recent track record, someone else will beat me to it.
You are looking for the POSITION of the first "
" AFTER the POSITION of "Transmission
". It does not matter if there are returns or other characters between them.
You can start from anywhere in a string with the Position() function. It need not start from the beginning.
Position ( text ; searchString ; start ; occurrence )
-- sent from my iPhone4 --