---
title: endOfLine
framework: regexbuilder
role: symbol
role_heading: Type Property
path: regexbuilder/anchor/endofline
---

# endOfLine

An anchor that matches at the end of a line, including at the end of the input string.

## Declaration

```swift
static var endOfLine: Anchor { get }
```

## Discussion

Discussion This anchor is equivalent to $ in regex syntax when the m option has been enabled or anchorsMatchLineEndings(true) has been called. For example, the following regexes are all equivalent: Regex { Anchor.endOfLine } /(?m)$/ or /(?m:$)/ /$/.anchorsMatchLineEndings(true)
