Skip to content

Commit 5bb0247

Browse files
committed
Update 9-regular-expressions\06-regexp-boundary\article.md
1 parent 2e02a6d commit 5bb0247

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

  • 9-regular-expressions/06-regexp-boundary

9-regular-expressions/06-regexp-boundary/article.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22

33
Il confine di parola `pattern:\b` è un test, proprio come `pattern:^` e `pattern:$`.
44

5-
When the regexp engine (program module that implements searching for regexps) comes across `pattern:\b`, it checks that the position in the string is a word boundary.
5+
Quando l'interprete delle regexp (il modulo software che cerca all'interno delle espressioni regolari) si imbatte in `pattern:\b`, verifica se la posizione nella stringa sia un confine di parola.
66

7-
There are three different positions that qualify as word boundaries:
7+
Ci sono tre differenti posizioni che qualificano il confine di parola:
88

9-
- At string start, if the first string character is a word character `pattern:\w`.
10-
- Between two characters in the string, where one is a word character `pattern:\w` and the other is not.
11-
- At string end, if the last string character is a word character `pattern:\w`.
9+
- Ad inizio stringa, se il primo carattere di essa è un carattere di parola `pattern:\w`.
10+
- Tra due caratteri di una stringa, laddove una sia un carattere di parola `pattern:\w` e l'altro no.
11+
- A fine stringa, se l'ultimo carattere è un carattere di parola `pattern:\w`.
1212

13-
For instance, regexp `pattern:\bJava\b` will be found in `subject:Hello, Java!`, where `subject:Java` is a standalone word, but not in `subject:Hello, JavaScript!`.
13+
Ad esempio, la regexp `pattern:\bJava\b` troverà corrispondenza in `subject:Hello, Java!`, dove `subject:Java` è una parola a sé, ma non troverà alcuna corrispondenza in `subject:Hello, JavaScript!`.
1414

1515
```js run
1616
alert( "Hello, Java!".match(/\bJava\b/) ); // Java
1717
alert( "Hello, JavaScript!".match(/\bJava\b/) ); // null
1818
```
1919

20-
In the string `subject:Hello, Java!` following positions correspond to `pattern:\b`:
20+
Nella stringa `subject:Hello, Java!` trovano riscontro in `pattern:\b` le seguenti posizioni:
2121

2222
![](hello-java-boundaries.svg)
2323

0 commit comments

Comments
 (0)