Please can someone tell me how to match "_" and a period "." excatly one time in a string using regex, Also is it more efficient using indexOf() instead of regex expression.
String s= "Hello_Wor.ld" or
s="12323_!£££$.asdfasd"
bascially any no of characters can come before and after _ and . the only requirement is that the entire string should only contain one occurance of _ and .
regexwill lose this consideration in straight matching casesregexwill probably win.