Skip to content

Commit 44c5464

Browse files
committed
Conflicts fixed on "Lookahead and lookbehind" task and solution page in
french language
1 parent c46d3a2 commit 44c5464

File tree

2 files changed

+0
-20
lines changed
  • 9-regular-expressions/14-regexp-lookahead-lookbehind/2-insert-after-head

2 files changed

+0
-20
lines changed

9-regular-expressions/14-regexp-lookahead-lookbehind/2-insert-after-head/solution.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
Pour insérer après la balise `<body>`, nous devons d'abord la trouver. Nous pouvons utiliser le modèle d'expression régulière `pattern:<body.*?>` pour cela.
22

3-
<<<<<<< HEAD
43
Dans cette tâche, nous n'avons pas besoin de modifier la balise `<body>`. Nous n'avons qu'à ajouter le texte après.
5-
=======
6-
In this task, we don't need to modify the `<body>` tag. We only need to add the text after it.
7-
>>>>>>> bf7d8bb1af3b416d393af1c15b03cb1352da1f9c
84

95
Voici comment nous pouvons le faire :
106

@@ -28,7 +24,6 @@ alert(str); // ...<body style="..."><h1>Hello</h1>...
2824

2925
Comme vous pouvez le voir, il n'y a qu'une partie lookbehind dans cette expression régulière.
3026

31-
<<<<<<< HEAD
3227
Cela fonctionne comme ceci :
3328
- À chaque position dans le texte.
3429
- Vérifiez s'il est précédé de `pattern:<body.*?>`.
@@ -37,15 +32,5 @@ Cela fonctionne comme ceci :
3732
La balise `pattern:<body.*?>` ne sera pas renvoyée. Le résultat de cette expression régulière est littéralement une chaîne vide, mais elle ne correspond qu'aux positions précédées de `pattern:<body.*?>`.
3833

3934
Il remplace donc la "ligne vide", précédée de `pattern:<body.*?>`, par `<h1>Hello</h1>`. C'est l'insertion après `<body>`.
40-
=======
41-
It works like this:
42-
- At every position in the text.
43-
- Check if it's preceded by `pattern:<body.*?>`.
44-
- If it's so, then we have the match.
45-
46-
The tag `pattern:<body.*?>` won't be returned. The result of this regexp is literally an empty string, but it matches only at positions preceded by `pattern:<body.*?>`.
47-
48-
So it replaces the "empty line", preceded by `pattern:<body.*?>`, with `<h1>Hello</h1>`. That's the insertion after `<body>`.
49-
>>>>>>> bf7d8bb1af3b416d393af1c15b03cb1352da1f9c
5035

5136
PS Les drapeaux d'expression régulière, tels que `pattern:s` et `pattern:i` peuvent également être utiles : `pattern:/<body.*?>/si`. Le drapeau `pattern:s` fait correspondre le point `pattern:.` à un caractère de retour à la ligne, et le drapeau `pattern:i` fait que `pattern:<body>` correspond également à `match:<BODY>` insensible à la casse.

9-regular-expressions/14-regexp-lookahead-lookbehind/2-insert-after-head/task.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,7 @@ let str = `
2020
str = str.replace(regexp, `<h1>Hello</h1>`);
2121
```
2222

23-
<<<<<<< HEAD
2423
Après cela, la valeur de `str` devrait être :
25-
=======
26-
After that the value of `str` should be:
27-
28-
>>>>>>> bf7d8bb1af3b416d393af1c15b03cb1352da1f9c
2924
```html
3025
<html>
3126
<body style="height: 200px"><h1>Hello</h1>

0 commit comments

Comments
 (0)