Newbies Albatross1959 Posted April 1, 2003 Newbies Posted April 1, 2003 Help...I am developing a database which is used to input text which in turn will feed Quark Xpress. Formatting for Quark takes place in the filemaker side. I have a field where the text is input and have used the wordcount function to display amazingly the word count! However part of the coding involves "<b>" for bold etc. even though there are no spaces between this code and the word.....the word count counts this as a word e.g. <b>The totals 2 words and not one.....as I do not know how many of these commands will repeat in any given record is there anyway around it???
Fitch Posted April 1, 2003 Posted April 1, 2003 Define a calculated field that strips out all the tags, like so: Substitute(Substitute(Substitute(Substitute(Substitute(Substitute (Substitute(Substitute(Substitute(Substitute(Substitute(Substitute (Substitute(Substitute(Substitute(Substitute( YourField, "</H1>", ""), "<H1>", "" ), "</H2>", "" ), "<H2>", "" ), "</H3>", "" ), "<H3>", "" ), "</H4>", "" ), "<H4>", "" ), "</H5>", "" ), "<H5>", "" ), "</H6>", "" ), "<H6>", "" ), "</B>" , "" ), "<B>" , "" ), "</I>" , ""), "<I>" , "") Then count the words in the calculated field.
LiveOak Posted April 1, 2003 Posted April 1, 2003 Or could just count these patterns and subtract the appropriate numbers from the word count (PatternCount). You wouldn't have to create a modified field. -bd
Recommended Posts
This topic is 7977 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