---
title: startOfLine
framework: regexbuilder
role: symbol
role_heading: Type Property
path: regexbuilder/anchor/startofline
---

# startOfLine

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

## Declaration

```swift
static var startOfLine: 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.startOfLine } /(?m)^/ or /(?m:^)/ /^/.anchorsMatchLineEndings(true)
