IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

avec Java Discussion :

11 min pour 60k lignes en java


Sujet :

avec Java

  1. #1
    Membre très actif
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2009
    Messages
    194
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France, Isère (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Novembre 2009
    Messages : 194
    Par défaut 11 min pour 60k lignes en java
    Bonjour,
    voila dans un code que je viens d ecrire je lis un fichier en entree (xml) de plus de 63000 lignes et j utilise ensuite certaine expressions reguliere pour remplacer certaine sequence.

    Pour lire le fichier j utilise un bufferReader qui lis ligne par ligne.

    Probleme : 11 minutes pour lire ces 60 000 lignes !!!

    Est ce normal ? y a t il un moyen plus rapide ?

    Merci

  2. #2
    Membre émérite
    Inscrit en
    Mars 2006
    Messages
    848
    Détails du profil
    Informations personnelles :
    Âge : 41

    Informations forums :
    Inscription : Mars 2006
    Messages : 848
    Par défaut
    Bonjour.

    Cela me paraît bien trop long. Il nous faudrait en savoir plus pour t'aider davantage.

    Ceci dit, est-ce indispensable de lire un XML avec un Reader? Un parser ne pourrait-il pas faire l'affaire?

    Quel genre de remplacement fais-tu?

  3. #3
    Membre très actif
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2009
    Messages
    194
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France, Isère (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Novembre 2009
    Messages : 194
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    import java.io.BufferedReader;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.io.IOException;
    import java.util.Scanner;
    import java.util.Vector;
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;
     
     
     
    public class Main {
     
     
    	public static void main(String[] args) {
     
     
    		String texteFlux = readFile();
     
    		 texteFlux = regexp1(texteFlux);
    		 texteFlux = regexp2(texteFlux);
    		 texteFlux = regexp3(texteFlux);
    		 texteFlux = regexp4(texteFlux);
    		 texteFlux = regexp5(texteFlux);
     
    		 //System.out.println();
    	}
     
    	static String readFile (){
    		FileReader input;
    		String texte = "";
     
     
    		System.out.println("Entrer le path de votre fichier");
     
    		Scanner sc = new Scanner(System.in);
    	    String path = sc.nextLine();
     
    		try {
    			input = new FileReader(path);
    			BufferedReader br = new BufferedReader(input);
     
    			String line=null;
    			try {
    				while((line=br.readLine())!=null){
    				texte+=line;
    				}
    			} catch (IOException e) {
    				e.printStackTrace();
    			}
     
    		} catch (FileNotFoundException e) {			
    			e.printStackTrace();
    		}
     
    		return texte;
    	}
     
     
    	static  String regexp1 (String input) {
     
    			String resultat = input;	
     
    			String first = "<Table(\\s[^<]+)*><TR(\\s[^<]+)*>(<TD(\\s[^<]+)*>[^<]*<\\\\TD>)?<TD(\\s[^<]+)*>IBM\\\\Chartered\\\\GLOBALFOUNDRIES\\\\Infineon\\\\Samsung\\\\ST <\\\\TD>.*?<\\\\Table>";
     
     
    			Pattern regexpInput = Pattern.compile(first);
    			Matcher matcherInput = regexpInput.matcher(input);
    			Vector<String> outPutString = new Vector<String>();
     
    			while (matcherInput.find()) {
    				String tmpString = matcherInput.replaceAll("");
    				if (!outPutString.contains(tmpString)) {
    					outPutString.add(tmpString);
     
    				}
    				resultat = tmpString;
    				//System.out.println("Number of substitution performed to remove footpages:"+i+"\n");
    			}
    			System.out.println(resultat);
    			return resultat;
    		}
     
    	static  String regexp2 (String input) {
     
    		String resultat = input;	
     
    		String first = "<\\\\Table><Table(\\s[^<]+)*>(<[^>]*>)*?(?<!<Caption>)";
    		Pattern regexpInput = Pattern.compile(first);
    		Matcher matcherInput = regexpInput.matcher(input);
    		Vector<String> outPutString = new Vector<String>();
    		int i=0;
    		while (matcherInput.find()) {
    			String tmpString = matcherInput.replaceAll("");
    			if (!outPutString.contains(tmpString)) {
    				outPutString.add(tmpString);
    				i++;
    			}
    			resultat = tmpString;
    			System.out.println("Number of substitution performed to remove footpages:"+i+"\n");
    		}
    		return resultat;
    	}
     
    	static  String regexp3 (String input) {
     
    		String resultat = input;	
     
    		String first = "(Table\\s[0-9-]+[\\.\\:\\s]+[^<]+)<\\\\P>[^<]*<Table(\\s[^<]+)*>";
    		Pattern regexpInput = Pattern.compile(first);
    		Matcher matcherInput = regexpInput.matcher(input);
    		Vector<String> outPutString = new Vector<String>();
    		int i=0;
    		while (matcherInput.find()) {
    			String g1 = matcherInput.group(1);
    			String tmpString = matcherInput.replaceAll("<\\\\P>\\n<Table><Caption><P>"+g1+"<\\P><\\\\Caption>");
    			if (!outPutString.contains(tmpString)) {
    				outPutString.add(tmpString);
    				i++;
    			}
    			resultat = tmpString;
    			System.out.println("Number of substitution performed to remove footpages:"+i+"\n");
    		}
    		return resultat;
    	}
     
    	static  String regexp4 (String input) {
     
    	String resultat = input;	
     
    	String first = "(Rule Set\\s[0-9-]+[\\:]+[^<]+)<\\\\P>[^<]*(<Figure>(.*?)<\\\\Figure>)*<Table(\\s[^<]+)*>";
    	Pattern regexpInput = Pattern.compile(first);
    	Matcher matcherInput = regexpInput.matcher(input);
    	Vector<String> outPutString = new Vector<String>();
    	int i=0;
    	while (matcherInput.find()) {
    		String g1 = matcherInput.group(1);
    		String tmpString = matcherInput.replaceAll("<\\\\P>\\n<Table><Caption><P>"+g1+"<\\\\P><\\\\Caption>");
    		if (!outPutString.contains(tmpString)) {
    			outPutString.add(tmpString);
    			i++;
    		}
    		resultat = tmpString;
    		System.out.println("Number of substitution performed to remove footpages:"+i+"\n");
    	}
    	return resultat;
    }
     
    	static  String regexp5 (String input) {
     
    	String resultat = input;	
     
    	String first = "(?<!<Caption>)<P>(Table\\s[0-9-]+[\\.\\:\\s]+[^<]+)<\\\\P>";
    	Pattern regexpInput = Pattern.compile(first);
    	Matcher matcherInput = regexpInput.matcher(input);
    	Vector<String> outPutString = new Vector<String>();
    	int i=0;
    	while (matcherInput.find()) {
    		String g1 = matcherInput.group(1);
    		String tmpString = matcherInput.replaceAll("\\n<Caption><P>"+g1+"<\\\\P><\\\\Caption>");
    		if (!outPutString.contains(tmpString)) {
    			outPutString.add(tmpString);
    			i++;
    		}
    		resultat = tmpString;
    		System.out.println("Number of substitution performed to remove footpages:"+i+"\n");
    	}
    	return resultat;
    }
     
     
    }
    voila mon code

    Ce que tu dit m interesse, quelle difference entre un parser et le bufferreader ?

  4. #4
    Membre émérite
    Inscrit en
    Mars 2006
    Messages
    848
    Détails du profil
    Informations personnelles :
    Âge : 41

    Informations forums :
    Inscription : Mars 2006
    Messages : 848
    Par défaut
    Au premier coup d'oeil, ce qui te plombe le plus, c'est certainement la concaténation de String:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    String texte = "";
    ...
    while((line=br.readLine())!=null){
        texte+=line;
    }
    Rien qu'en utilisant un StringBuilder, tu devrait déjà y gagner:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    StringBuilder builder = new StringBuilder();
    ...
    while((line=br.readLine())!=null){
        builder.append(line);
    }
    Après, je pense qu'il y a d'autres points que l'on peut améliorer.

  5. #5
    Expert éminent
    Avatar de adiGuba
    Homme Profil pro
    Développeur Java/Web
    Inscrit en
    Avril 2002
    Messages
    13 938
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Java/Web
    Secteur : Transports

    Informations forums :
    Inscription : Avril 2002
    Messages : 13 938
    Billets dans le blog
    1
    Par défaut
    Salut,



    Déjà ta lecture du fichier est catastrophique : tu concatènes chaque ligne dans une String avec +, ce qui crée plusieurs objets temporaires à chaque boucle.

    Il faut utiliser un StringBuilder/StringBuffer pour cela !


    Ensuite la lecture par ligne est inutile puisque tu veux récupérer tout le fichier en mémoire. Autant faire directement une lecture par bloc dans ce cas là...

    Il manque également le try/finally pour la fermeture des ressources, et une gestion propre des exceptions


    Enfin je n'ai pas trop regardé tes méthodes regexp() en détail car je ne sais pas ce qu'elle doivent faire, mais il y a des points qui me choque un peu :
    • Ton Vector est complètement inutile...
    • Tu n'as pas à utiliser à replaceAll() dans la boucle sur find().
      Code : Sélectionner tout - Visualiser dans une fenêtre à part
      1
      2
      while (matcherInput.find()) {
      		String tmpString = matcherInput.replaceAll("");
      Soit on utilise find() pour rechercher les données, soit on utilises directement replaceAll() pour remplacer toutes les données. Mais en aucun cas il ne faut les utiliser ensemble !
    • D'ailleurs je ne comprend pas l'intérêt de la boucle puisque tu n'y traites jamais les données spécifiques. Tu refais plusieurs fois le même traitement. En fait du peu que j'en voit un String.replaceAll() ferait la même chose en beaucoup plus rapide...




    a++

  6. #6
    Membre très actif
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2009
    Messages
    194
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France, Isère (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Novembre 2009
    Messages : 194
    Par défaut
    Merci de ces precisions

    Je tiens juste a dire pour ma defense que je suis en premiere annee de bts info, et que je "touche"au java depuis peu de temps.

    Je m empresse de changer tout ca en stringBuilder deja et je reviendrai certainement vers vous.

    Merci beaucoup

  7. #7
    Membre très actif
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2009
    Messages
    194
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France, Isère (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Novembre 2009
    Messages : 194
    Par défaut
    ok ca y est je suis perdu ^^

    je ne connaissai pas du tout StringBuilder et maintenant que j ai change j ai plein de truc en rouge.

    Sachant qu au depart j ai ca :


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    	String resultat = texteFlux;	
     
    		String first = "<\\\\Table><Table(\\s[^<]+)*>(<[^>]*>)*?(?<!<Caption>)";
    		Pattern regexpInput = Pattern.compile(first);
    		Matcher matcherInput = regexpInput.matcher(texteFlux);
    		Vector<String> outPutString = new Vector<String>();
    		int i=0;
    		while (matcherInput.find()) {
    			String tmpString = matcherInput.replaceAll("");
    			if (!outPutString.contains(tmpString)) {
    				outPutString.add(tmpString);
    				i++;
    			}
    			resultat = tmpString;
    			System.out.println("Number of substitution performed to remove footpages:"+i+"\n");
    		}
    		return resultat;


    Comment dois je le modifier en StringBuilder, et comment me debarasser du Vector ?

  8. #8
    Expert éminent
    Avatar de adiGuba
    Homme Profil pro
    Développeur Java/Web
    Inscrit en
    Avril 2002
    Messages
    13 938
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Java/Web
    Secteur : Transports

    Informations forums :
    Inscription : Avril 2002
    Messages : 13 938
    Billets dans le blog
    1
    Par défaut
    Merci de penser à entourer ton code avec les balises [code] et [/code] !!!


    Citation Envoyé par delta07 Voir le message
    et maintenant que j ai change j ai plein de truc en rouge.
    Cela s'appelle une erreur, et en général il y a un message qui explique la raison de cela...



    [quote=delta07;5004822]Sachant qu au depart j ai ca : [/code]
    C'est dans la méthode de lecture qu'il faut utiliser StringBuilder (ou StringBuffer si tu utilises une vielle version de Java). Tu dois avoir plein d'exemple sur le forum...



    Le code que tu donnes là correspond à une de tes méthodes regexp() : il faudrait déjà savoir à quoi elles servent ?

    Citation Envoyé par delta07 Voir le message
    et comment me debarasser du Vector ?
    Même question : a quoi sert le Vector dans ton code ?

    a++

  9. #9
    Membre très actif
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2009
    Messages
    194
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France, Isère (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Novembre 2009
    Messages : 194
    Par défaut
    ok alors je vais essayer de faire simple :

    - Je prend en entree un fichier xml
    - Ensuite j applique plusieurs expressions regulieres pour remplacer ou supprimer certaines balises et leurs contenus
    -Et enfin je creer un nouveau fichier xml ne contenant que ce qui m interesse

    Le premier code marchait bien et faisait ce que je demandais, mais plus de 10min pour 60k lignes ca n est pas gerable.
    Pour ce qui est du code lui meme, les regexp sont au depart prises dans un script Perl. J ai donc recupere ces regexp, trouve quelque bout de code java sur le net, et j ai fait tout ca a ma sauce.

    Plus tard je devrais traiter le xml avec d autres codes.Mais pour l heure je dois epurer ce xml de tout ce qui m est inutile.

    desole pour les accents je suis en qwerty

  10. #10
    Membre chevronné
    Inscrit en
    Juillet 2006
    Messages
    534
    Détails du profil
    Informations forums :
    Inscription : Juillet 2006
    Messages : 534
    Par défaut
    Mais pour l heure je dois epurer ce xml de tout ce qui m est inutile.
    Peut-etre tu dois comencer a grouper tes fonctions en une ou deux avec parametres au lieu de duppliquer.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
     
     texteFlux = regexp1(texteFlux);
     texteFlux = regexp2(texteFlux);
     texteFlux = regexp3(texteFlux);
     texteFlux = regexp4(texteFlux);
     texteFlux = regexp5(texteFlux);
    Essais d'utiliser List au lieu de Vector

  11. #11
    Membre très actif
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2009
    Messages
    194
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France, Isère (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Novembre 2009
    Messages : 194
    Par défaut
    Bine, j ai epure un peu mon code

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
     
    import java.io.BufferedReader;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.util.Scanner;
    import java.util.Vector;
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;
     
     
     
    public class lo {
     
     
    	public static void main(String[] args) {
     
     
    		String texteFlux = readFile();
     
    		 texteFlux = regexp1(texteFlux,"<Table(\\s[^<]+)*><TR(\\s[^<]+)*>(<TD(\\s[^<]+)*>[^<]*<\\\\TD>)?<TD(\\s[^<]+)*>IBM\\\\Chartered\\\\GLOBALFOUNDRIES\\\\Infineon\\\\Samsung\\\\ST <\\\\TD>.*?<\\\\Table>","");
    		 texteFlux = regexp1(texteFlux,"<\\\\Table><Table(\\s[^<]+)*>(<[^>]*>)*?(?<!<Caption>)","");
    		 texteFlux = regexp3(texteFlux,"(Table\\s[0-9-]+[\\.\\:\\s]+[^<]+)<\\\\P>[^<]*<Table(\\s[^<]+)*>","<\\\\P>\\n<Table><Caption><P>","<\\P><\\\\Caption>");
    		 texteFlux = regexp3(texteFlux,"(Rule Set\\s[0-9-]+[\\:]+[^<]+)<\\\\P>[^<]*(<Figure>(.*?)<\\\\Figure>)*<Table(\\s[^<]+)*>","<\\\\P>\\n<Table><Caption><P>","<\\\\P><\\\\Caption>");
    		 texteFlux = regexp3(texteFlux, "(?<!<Caption>)<P>(Table\\s[0-9-]+[\\.\\:\\s]+[^<]+)<\\\\P>","\\n<Caption><P>","<\\\\P><\\\\Caption>");
     
    		// writeFile(texteFlux);
    	}
     
    	static String readFile (){
    		FileReader input;
    		String texte = "";
     
     
    		System.out.println("Entrer le path de votre fichier");
     
    		Scanner sc = new Scanner(System.in);
    	    String path = sc.nextLine();
     
    		try {
    			input = new FileReader(path);
    			BufferedReader br = new BufferedReader(input);
     
    			String line=null;
    			try {
    				while((line=br.readLine())!=null){
    				texte+=line;
    				}
    			} catch (IOException e) {
    				e.printStackTrace();
    			}
     
    		} catch (FileNotFoundException e) {			
    			e.printStackTrace();
    		}
     
    		return texte;
    	}
     
     
    	static  String regexp1 (String input,String regexp,String replaceBy) {
     
    			String resultat = input;	
     
    			String first = regexp;
     
    			Pattern regexpInput = Pattern.compile(first);
    			Matcher matcherInput = regexpInput.matcher(input);
    			Vector<String> outPutString = new Vector<String>();
     
    			while (matcherInput.find()) {
    				String tmpString = matcherInput.replaceAll(replaceBy);
    				if (!outPutString.contains(tmpString)) {
    					outPutString.add(tmpString);
     
    				}
    				resultat = tmpString;
    				}
    			return resultat;
    		}
     
     
     
    	static  String regexp3 (String input,String regexp,String replaceBy1,String replaceBy2) {
     
    		String resultat = input;	
     
    		String first = regexp;
    		Pattern regexpInput = Pattern.compile(first);
    		Matcher matcherInput = regexpInput.matcher(input);
    		Vector<String> outPutString = new Vector<String>();
     
    		while (matcherInput.find()) {
    			String g1 = matcherInput.group(1);
    			String tmpString = matcherInput.replaceAll(""+replaceBy1+""+g1+""+replaceBy2+"");
    			if (!outPutString.contains(tmpString)) {
    				outPutString.add(tmpString);
     
    			}
    			resultat = tmpString;
     
    		}
    		return resultat;
    	}
     
     
     
    	static void writeFile (String texteFlux){
     
    		FileWriter writer = null;
    		String texte = texteFlux;
    		try{
    		     writer = new FileWriter("/home/gc98/doctest/resultat001.txt", true);
    		     writer.write(texte,0,texte.length());
    		}catch(IOException ex){
    		    ex.printStackTrace();
    		}finally{
    		  if(writer != null){
    		     try {
    				writer.close();
    			} catch (IOException e) {
    				// TODO Auto-generated catch block
    				e.printStackTrace();
    			}
    		  }
    		}
     
    	}
     
    }


    Cependant je ne vois pas comment integrer le StringBuilder pusqu Eclipse me demande une simple String pour :

    String tmpString = matcherInput.replaceAll(replaceBy);



    Comment faire du pattern matching avec un StringBuilder du coup ?

  12. #12
    Membre émérite
    Inscrit en
    Mars 2006
    Messages
    848
    Détails du profil
    Informations personnelles :
    Âge : 41

    Informations forums :
    Inscription : Mars 2006
    Messages : 848
    Par défaut
    Une fois que tu as fini de lire ton fichier, tu récupère la String via la méthode toString() de ton StringBuilder.

  13. #13
    Membre très actif
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2009
    Messages
    194
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France, Isère (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Novembre 2009
    Messages : 194
    Par défaut
    Super !!

    A priori ca a fonctionner, merci. C est presque instantane maintenant.

    Lundi je verifierai mes expressions reguliere et le tour sera jouer.

    Encore merci et bon week end a tous !!

  14. #14
    Expert éminent
    Avatar de adiGuba
    Homme Profil pro
    Développeur Java/Web
    Inscrit en
    Avril 2002
    Messages
    13 938
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Java/Web
    Secteur : Transports

    Informations forums :
    Inscription : Avril 2002
    Messages : 13 938
    Billets dans le blog
    1
    Par défaut
    Citation Envoyé par delta07 Voir le message
    - Ensuite j applique plusieurs expressions regulieres pour remplacer ou supprimer certaines balises et leurs contenus
    Donc tes méthodes regexp() servent à cela ! Pourquoi ne pas directement utiliser la méthode replaceAll() ??? Et à quoi sert le Vector ???


    a++

Discussions similaires

  1. Réponses: 0
    Dernier message: 29/11/2013, 10h10
  2. Réponses: 0
    Dernier message: 24/10/2013, 22h23
  3. [Composants] TRichEdit: Une police pour chaque ligne
    Par naili dans le forum C++Builder
    Réponses: 3
    Dernier message: 16/03/2003, 15h59
  4. String Grid et choix d'une couleur pour une ligne
    Par Gigottine dans le forum C++Builder
    Réponses: 12
    Dernier message: 17/05/2002, 15h23

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo