So far:
I scanned a .txt
file which includes words such as ("monster, lobster, chopper")
If I used a scanner
class input //for my input I would like to input "er"
how would I be able to print the words in the .txt
that include "er"
?
you can use string.Contains("er")
to check if the word matches your pattern or not
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.