A MathWikiből

How to

Use the webpage we used on the practical:

All you need to send is the regex (that you wrote in the regular expression box on the website).

Regex links (3 points)

Write a regular expression that finds links in an html code. We can assume that links:

  • start with http://
  • apart from alphanumeric characters only contain the following characters:
    • / (per),
    • . (dot),
    • ~ (tilde).

For example, in the following code it only finds the 4 links:

 	<div id="header_col2"> 
 		<a href="index_en.xhtml" title="English version"> 
 			<img src="eng.jpg" alt="English" height="25" width="48"/>
 <div id="clear">
 	<h2> Some links </h2>
 		<a href="">Department of Algebra</a><br/>
 		<a href="">Matematics Institude</a><br/>
 		<a href="">BME</a> <br/>
 		<a href="">Something else</a> <br/>

Found results:

Személyes eszközök