[java] expression régulière
karine
-
befa -
befa -
Bonjour,
Je vous explique mon problème.
J'ai une chaine String qui contient ça :
Moi je voudrais pouvoir séparer HTTP/1.1 200 OK du reste et récuperer les deux parties.
Pour l'instant je fais ça :
String regex3 = "HTTP(.*)\\s{1}([.]+)";
Mais le prog ne trouve pas de match.
Est-ce qu'il y aurait un spécialiste des regex dans le coin ?
Merci
Je vous explique mon problème.
J'ai une chaine String qui contient ça :
HTTP/1.1 200 OK
Date: Wed, 27 Apr 2005 13:26:04 GMT
Server: Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_ssl/2.8.12 OpenSSL/0.9.6b PHP/4.1.2 mod_perl/1.26
Last-Modified: Fri, 15 Jun 2001 14:29:07 GMT
ETag: "11536-3b8-3b2a1bb3"
Accept-Ranges: bytes
Content-Length: 952
Connection: close
Content-Type: text/html
<HTML>
<HEAD>
<title>DESS IA Paris VI</title>
<script language="JavaScript" type="text/javascript">
if (self != top) { top.location.href = self.location.href; }
</script>
</HEAD>
<frameset cols="180,*" border=1 framespacing=0 frameborder=1>
<frame src="map2.php3" name="bords" scrolling=auto noresize
framespacing=0 frameborder=0 border=0
marginheight=0 marginwidth=5>
<frame src="main.html" name="main" scrolling=auto
framespacing=0 frameborder=0 border=0
marginheight=0 marginwidth=0>
<noframe>
<center> <h4> On dirait que votre navigateur ne lit pas les frames. <p>
Désolé mais vous devez avoir un browser qui peut
lire les frames pour pouvoir profiter de ce site!
</center>
</noframe>
</frameset>
<noscript>
Make sure that JavaScript is turned on.
Otherwise, this page (and rest of the pages in this site) won't work.
</noscript>
</html>
Moi je voudrais pouvoir séparer HTTP/1.1 200 OK du reste et récuperer les deux parties.
Pour l'instant je fais ça :
String regex3 = "HTTP(.*)\\s{1}([.]+)";
Mais le prog ne trouve pas de match.
Est-ce qu'il y aurait un spécialiste des regex dans le coin ?
Merci
A voir également:
- [java] expression régulière
- Jeux java itel - Télécharger - Jeux vidéo
- Waptrick java football - Télécharger - Jeux vidéo
- Waptrick java voiture - Télécharger - Jeux vidéo
- Java apk - Télécharger - Langages
- Eclipse java - Télécharger - Langages