January 27, 20214 yr Hi everyone I have a Calculation Field called "extract_field_1" which extracts the data of "field_1" (ie, anything between "field_1:" and "field_2:" in a text-field called INPUT which looks like this: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Let ( [ lineStart = Position ( INPUT ; "¶field_1:" ; 1 ; 1 ) ; start = lineStart + Length("¶field_1:"); end = Position ( INPUT ; "¶field_2:" ; start ; 1 ) ] ; Middle ( INPUT ; start ; end - start ) ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This works nicely (many thanks to comment for this). However, sometimes the result will start with one or more "space" characters and sometimes not. It depends on what my user has typed into INPUT!!! Can anyone recommend how to add to this Calculation so that: -- any leading "spaces" are removed from the beginning of the result. Thanks in anticipation. Philip
January 27, 20214 yr Consider using the Trim() function that strips all leading and trailing spaces. -- P.S. Please use the default font when posting.
January 27, 20214 yr Author Thanks comment. Of course Trim() worked perfectly. Sorry about the large font size of my original message. I had to increase it so my poor elderly eyes could read my code on screen, and then I forgot to change it back down again afterwards. Sorry, and Thanks. Stay Safe!
Create an account or sign in to comment