I'm not sure how you would do it with the MID function but try the InStr function. In Crystal, go to HELP and search for InStr. That page describes the parameters. You will see:
- InStr (str1, str2)
- InStr (start, str1, str2)
- InStr (str1, str2, compare)
- InStr (start, str1, str2, compare)
Arguments
- start is the character in str1 where the search is to begin. This is a 1 based index. (This argument is optional.)
- str1 is the text string to be searched.
- str2 is the text string being sought within str1.
- compare is an optional number value indicating which type of string comparison should be used. 0 indicates case-sensitive comparison, and 1 indicates case-insensitive comparison. If this argument is not used, a case-sensitive comparison is performed.
Hope this helps.