I have string input in the following two forms.
1.
<!DOCTYPE
2.
<!--XYZdfdjf., 15456, hdfv.4002
<!DOCTYPE
I want to return a match if form 2 is found and does not match form 1. Thus, basically, I want the regular expression to arbitrarily accept all characters between <!--and <!DOCTYPE, except when there is a space between them -->.
I use Pattern, Matcher and java regex. Help is requested in terms of a regular expression that can be used with Pattern.compile ()
Thanks in advance.
source
share