In Java - I need to search / check the input string for a number or for a specific string. it must be one of them. For example, if I have these input lines:
cccccccc 123 vvvvvvvvv jhdakfksah
cccccccc ABC vvvvvvnhj yroijpotpo
cccdcdcd 234 vcbvbvbvbv lkjd dfdggf
ccccbvff ABC jflkjlkjlj fgdgfg
I need to find 123, ABC, 234, ABC
to find the number that I could use regex: "\ d +", but look for any of them. How to combine them?
source
share