Suppose I have the following regex that matches a string with a semicolon at the end:
".+";
It will match any string except an empty one, like the one below:
"";
I tried using this:
".+?";
But that didn't work.
My question is, how can I make the .+
part of the, optional, so the user doesn't have to put any characters in the string?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…