Looker Studio is now called Data Studio. Learn more about this change.

Caret (^)

Use the caret to match the following adjacent characters at the beginning of a string.

For example, ^St matches the following:

  • Start here
  • Stand here
  • Stop here

However, ^St doesn't match the following:

  • 1 Start here
  • 2 Stand here
  • 3 Stop here

The preceding three lines start with a digit and a space, not with the letters "St".

Use this type of regular expression to create segments, filters, or goal steps that match a URI. For example, if you need to isolate data for a particular directory of pages, you can use expressions such as the following:

  • ^/mens/ (matches www.example.com/mens/)
  • ^/womens/ (matches www.example.com/womens/)

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026年08月26日 UTC.