I am using a regular expression to convert plain text URL to clickable links.
@(https?://([-w.]+)+(:d+)?(/([w/_.-]*(?S+)?)?)?)@
However, sometimes in the body of the text, URL are enumerated one per line with a semi-colon at the end. The real URL does not contain any ";".
http://www.aaa.org/pressdetail.asp?PRESS_REL_ID=275;
http://www.aaa.org/pressdetail.asp?PRESS_REL_ID=123;
http://www.aaa.org/pressdetail.asp?PRESS_REL_ID=124
Is it permitted to have a semicolon (;) in a URL or can the semicolon be considered a marker of the end of an URL? How would that fit in my regular expression?
question from:
https://stackoverflow.com/questions/1178024/can-a-url-contain-a-semicolon-and-still-be-valid 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…