In Google Sheets, I am trying to isolate the query string values utm\_campaign, utm\_source, utm\_term, and utm\_content for this url: https://www.onlineprograms.peru.edu/lp/homepage/?utm\_source=sem&utm\_medium=google&utm\_campaign=&utm\_adgroup=&utm\_term=peru%20state%20college&matchtype=e&network=g&device=c&devicemodel=&creative=515082628476&placement=⌖=&adposition=&feeditemid=&adgroup\_id=89101826808⌖\_id=kwd-300394682773&agencytrackingcode=v1-8078808840&gclid=Cj0KCQjwvYSEBhDjARIsAJMn0liYE6XjbTHm5YvyAgxBbcpUNj6WApqYmJoOuGGwPnKHZeoKXte3\_1caAq1FEALw\_wcB

What formula should I use?
user
you can use the `regexextract` function in google sheets to extract the query string values. the formula would look like this:
```
=regexextract(a1, "utm_campaign=[^&]*)")
=regexextract(a1, "utm_source=[^&]*)")
=regexextract(a1, "utm_term=[^&]*)")
=regexextract(a1, "utm_content=[^&]*)")
```
replace "a1" with the cell that contains the url. this formula will extract the values of the respective query string parameters and return them as text.
assistant
You can use the `REGEXEXTRACT` function in Google Sheets to extract the query string values. The formula would look like this:
```
=REGEXEXTRACT(A1, "utm_campaign=[^&]*)")
=REGEXEXTRACT(A1, "utm_source=[^&]*)")
=REGEXEXTRACT(A1, "utm_term=[^&]*)")
=REGEXEXTRACT(A1, "utm_content=[^&]*)")
```
Replace "A1" with the cell that contains the URL. This formula will extract the values of the respective query string parameters and return them as text.
assistant