Skip to content

Instantly share code, notes, and snippets.

@igrigorik
Last active September 29, 2016 21:09
Show Gist options
  • Save igrigorik/9e66f92338821af4976b3cf25ab7f55a to your computer and use it in GitHub Desktop.
Save igrigorik/9e66f92338821af4976b3cf25ab7f55a to your computer and use it in GitHub Desktop.
[
{
"f0_": "202863",
"entries": "getEntriesByType(\"resource"
},
{
"f0_": "4454",
"entries": "getEntriesByType('resource"
}
]
SELECT
COUNT(entries), entries FROM (
SELECT
page,
url,
REGEXP_EXTRACT(body, r'i:getEntriesByType\([\"\']resource)') AS entries
FROM
[httparchive:har.2016_09_01_chrome_requests_bodies]
WHERE
body CONTAINS 'getEntriesByType' )
WHERE
entries IS NOT NULL
GROUP BY entries
SELECT count(entries), entries FROM (
SELECT page, url,
REGEXP_EXTRACT(body, r'(getEntriesByType\([\"\']resource)') AS entries
FROM [httparchive:har.2016_09_01_chrome_requests_bodies]
WHERE body CONTAINS 'getEntriesByType' IGNORE CASE
)
WHERE entries IS NOT null
GROUP by entries
[
{
"f0_": "4454",
"entries": "getEntriesByType('resource"
},
{
"f0_": "202863",
"entries": "getEntriesByType(\"resource"
}
]
@yoavweiss
Copy link

Potentially dumb question, but wouldn't the "IGNORE_CASE" apply to 'getEntriesByType' rather than the regexp?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment