lot__no is a public string
Dim myDelims As String() = New String() {"<beginning of record>"}
split = temp_string.Split(myDelims, StringSplitOptions.None)
For Each s As String In split
If InStr(s, lot__no) <> 0 Then...........
all of this code works, except it is not finding lot__no in s for some reason, even though in the debugger i checked everything should be working
a sample of temp_string:
<beginning of record><Patient name>Alex Gordon</Patient name><Patient ID>1239871</Patient ID><Doc name>Dr. Bortz</Doc name><Lot no>928374</Lot no><highly intolerant>Blueberry*,*Cheddar Cheese*,*Chicken*,*Chili Pepper*,*Chocolate*,*Cinnamon*,*Clam*,*</highly intolerant><moderately>Beef*,*Broccoli*,*Codfish*,*Coffee*,*Cola nut*,*</moderately><lightly>Barley, Whole Grain*,*Buckwheat*,*Butter*,*Cabbage*,*Cane sugar*,*Cantaloupe*,*Carrot*,*Cashew*,*Cauliflower*,*Celery*,*</lightly><none>Almond*,*American Cheese*,*Apple*,*Avocado*,*Banana*,*Corn*,*Cottage Chesse*,*Cow's Milk*,*Crab*,*Cucumber*,*Egg, white/yolk*,*Eggplant*,*Garlic*,*Goat's Milk*,*Grape, White/Concord*,*Grapefruit*,*Green pea*,*Green pepper*,*Halibut*,*Honey*,*Lettuce, Iceberg*,*Lemon*,*Lima bean*,*Lobster*,*Malt*,*Millet*,*Mushroom*,*Mustard Seed*,*Oat*,*Olive*,*Onion*,*Orange*,*Oyster*,*Parsley*,*Peach*,*Peanut*,*Pinto bean*,*Pineapple*,*Pork*,*Potato*,*Rice*,*Rye*,*Safflower seed*,*Salmon*,*Sardine*,*Scallop*,*Sesame*,*Shrimp*,*Sole*,*Soybean*,*Spinach*,*Squashes*,*Strawberry*,*String bean*,*Sunflower seed*,*Sweet potato*,*Swiss Cheese*,*Tea, black*,*Tobacco*,*Tomato*,*Trout*,*Tuna*,*Turkey*,*Walnut, black*,*Wheat*,*Yeast, Baker's*,*Yeast, Brewer's*,*Yogurt*,*</none><beginning of record><Patient name>Patient Name</Patient name><Patient ID>Patient ID</Patient ID><Doc name>Doctor's Name</Doc name><Lot no>Lot #</Lot no><highly intolerant>Blueberry*,*</highly intolerant><moderately>Beef*,*</moderately><lightly>Barley, Whole Grain*,*</lightly><none>Almond*,*American Cheese*,*Apple*,*Avocado*,*Banana*,*Broccoli*,*Buckwheat*,*Butter*,*Cabbage*,*Cane sugar*,*Cantaloupe*,*Carrot*,*Cashew*,*Cauliflower*,*Celery*,*Cheddar Cheese*,*Chicken*,*Chili Pepper*,*Chocolate*,*Cinnamon*,*Clam*,*Codfish*,*Coffee*,*Cola nut*,*Corn*,*Cottage Chesse*,*Cow's Milk*,*Crab*,*Cucumber*,*Egg, white/yolk*,*Eggplant*,*Garlic*,*Goat's Milk*,*Grape, White/Concord*,*Grapefruit*,*Green pea*,*Green pepper*,*Halibut*,*Honey*,*Lettuce, Iceberg*,*Lemon*,*Lima bean*,*Lobster*,*Malt*,*Millet*,*Mushroom*,*Mustard Seed*,*Oat*,*Olive*,*Onion*,*Orange*,*Oyster*,*Parsley*,*Peach*,*Peanut*,*Pinto bean*,*Pineapple*,*Pork*,*Potato*,*Rice*,*Rye*,*Safflower seed*,*Salmon*,*Sardine*,*Scallop*,*Sesame*,*Shrimp*,*Sole*,*Soybean*,*Spinach*,*Squashes*,*Strawberry*,*String bean*,*Sunflower seed*,*Sweet potato*,*Swiss Cheese*,*Tea, black*,*Tobacco*,*Tomato*,*Trout*,*Tuna*,*Turkey*,*Walnut, black*,*Wheat*,*Yeast, Baker's*,*Yeast, Brewer's*,*Yogurt*,*</none><beginning of record><Patient name>Carter Smith</Patient name><Patient ID>id123123</Patient ID><Doc name>dr katz</Doc name><Lot no>lot293847</Lot no><highly intolerant>Barley, Whole Grain*,*</highly intolerant><moderately>Banana*,*Beef*,*</moderately><lightly>Avocado*,*Blueberry*,*</lightly><none>12*,*American Cheese*,*Apple*,*Broccoli*,*Buckwheat*,*Butter*,*Cabbage*,*Cane sugar*,*Cantaloupe*,*Carrot*,*Cashew*,*Cauliflower*,*Celery*,*Cheddar Cheese*,*Chicken*,*Chili Pepper*,*Chocolate*,*Cinnamon*,*Clam*,*Codfish*,*Coffee*,*Cola nut*,*Corn*,*Cottage Chesse*,*Cow's Milk*,*Crab*,*Cucumber*,*Egg, white/yolk*,*Eggplant*,*Garlic*,*Goat's Milk*,*Grape, White/Concord*,*Grapefruit*,*Green pea*,*Green pepper*,*Halibut*,*Honey*,*Lettuce, Iceberg*,*Lemon*,*Lima bean*,*Lobster*,*Malt*,*Millet*,*Mushroom*,*Mustard Seed*,*Oat*,*Olive*,*Onion*,*Orange*,*Oyster*,*Parsley*,*Peach*,*Peanut*,*Pinto bean*,*Pineapple*,*Pork*,*Potato*,*Rice*,*Rye*,*Safflower seed*,*Salmon*,*Sardine*,*Scallop*,*Sesame*,*Shrimp*,*Sole*,*Soybean*,*Spinach*,*Squashes*,*Strawberry*,*String bean*,*Sunflower seed*,*Sweet potato*,*Swiss Cheese*,*Tea, black*,*Tobacco*,*Tomato*,*Trout*,*Tuna*,*Turkey*,*Walnut, black*,*Wheat*,*Yeast, Baker's*,*Yeast, Brewer's*,*Yogurt*,*</none><beginning of record><Patient name>Patient Name</Patient name><Patient ID>Patient ID</Patient ID><Doc name>Doctor's Name</Doc name><Lot no>Lot #</Lot no><highly intolerant>Broccoli*,*Cane sugar*,*Cantaloupe*,*Carrot*,*Cashew*,*</highly intolerant><moderately>Blueberry*,*Buckwheat*,*Cabbage*,*Cheddar Cheese*,*Chicken*,*Chili Pepper*,*Chocolate*,*Cinnamon*,*</moderately><lightly>Beef*,*Butter*,*Cola nut*,*Corn*,*Cottage Chesse*,*Cow's Milk*,*</lightly><none>1*,*2*,*3*,*Avocado*,*Banana*,*Barley, Whole Grain*,*Cauliflower*,*Celery*,*Clam*,*Codfish*,*Coffee*,*Crab*,*Cucumber*,*Egg, white/yolk*,*Eggplant*,*Garlic*,*Goat's Milk*,*Grape, White/Concord*,*Grapefruit*,*Green pea*,*Green pepper*,*Halibut*,*Honey*,*Lettuce, Iceberg*,*Lemon*,*Lima bean*,*Lobster*,*Malt*,*Millet*,*Mushroom*,*Mustard Seed*,*Oat*,*Olive*,*Onion*,*Orange*,*Oyster*,*Parsley*,*Peach*,*Peanut*,*Pinto bean*,*Pineapple*,*Pork*,*Potato*,*Rice*,*Rye*,*Safflower seed*,*Salmon*,*Sardine*,*Scallop*,*Sesame*,*Shrimp*,*Sole*,*Soybean*,*Spinach*,*Squashes*,*Strawberry*,*String bean*,*Sunflower seed*,*Sweet potato*,*Swiss Cheese*,*Tea, black*,*Tobacco*,*Tomato*,*Trout*,*Tuna*,*Turkey*,*Walnut, black*,*Wheat*,*Yeast, Baker's*,*Yeast, Brewer's*,*Yogurt*,*</none>
anyone have any ideas why one string is not detected in the other?
the problem is a deeper one than you guys think because i do know that the code is fine
thank you everyone for your input but unfortunately it has not been helpful. i am still having the problem