Skip to content

Commit c07bb62

Browse files
author
wendy@lastlookeditorial.com
committed
Edited ch07.asciidoc with Atlas code editor
1 parent 4e25fca commit c07bb62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ch07.asciidoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1652,7 +1652,7 @@ Check out this exhaustive ((("Unicode", "supported Unicode properties and values
16521652

16531653
==== Lookbehind Assertions
16541654

1655-
JavaScript has had positive ((("lookahead assertions")))((("Lookbehind assertions", id="la7")))lookahead assertions for a long time. That feature allows us to match an expression but only if it's followed by another expression. These assertions are expressed as `(?=…)`. Regardless of whether a lookahead assertion matches, the results of that match are discarded and no characters of the input string are consumed.
1655+
JavaScript has had positive ((("lookahead assertions")))((("lookbehind assertions", id="la7")))lookahead assertions for a long time. That feature allows us to match an expression but only if it's followed by another expression. These assertions are expressed as `(?=…)`. Regardless of whether a lookahead assertion matches, the results of that match are discarded and no characters of the input string are consumed.
16561656

16571657
The following example uses a positive lookahead to test whether an input string has a sequence of letters followed by `.js`, in which case it returns the filename without the `.js` part.
16581658

@@ -1702,7 +1702,7 @@ getDollarAmount('$12.34') // <- '12.34'
17021702
getDollarAmount('€12.34') // <- null
17031703
----
17041704

1705-
On the other hand, a negative lookbehind could be used to match numbers that aren't preceded by a ((("Lookbehind assertions", startref="la7")))dollar sign.
1705+
On the other hand, a negative lookbehind could be used to match numbers that aren't preceded by a ((("lookbehind assertions", startref="la7")))dollar sign.
17061706

17071707
[source,javascript]
17081708
----

0 commit comments

Comments
 (0)