Public
Edited
Jun 12, 2023
2 forks
2 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
db
select
regex_version(),
regex_debug(),
'foobar' regexp 'foo';
Insert cell
Insert cell
Insert cell
db
select regexset_is_match(
regexset(
"bar",
"foo",
"barfoo"
),
'foobar'
)
Insert cell
Insert cell
db
with test_strings as (
select value as string
from json_each('[
"example.com",
"foo@example.com",
"example"
]')
)
select
test_strings.string,
matches.pattern
from test_strings
left join regexset_matches(
regexset(
'[a-z]+@[a-z]+\.(com|org|net)',
'[a-z]+\.(com|org|net)'
),
test_strings.string
) as matches
Insert cell
Insert cell
db
select regex_find(
'\b\w{13}\b',
'I categorically deny having triskaidekaphobia.'
) as word_13_chars;
Insert cell
db
select *
from regex_find_all(
'\b\w{13}\b',
'Retroactively relinquishing remunerations is reprehensible.'
);
Insert cell
Insert cell
db
select *
from regex_split(
regex('[ \\t]+'),
'a b \t c\td e'
)
Insert cell
Insert cell
db
select
regex_replace(
'[^01]+',
'1078910',
''
) as only_binary,
regex_replace(
'(?P<last>[^,\s]+),\s+(?P<first>\S+)',
'Springsteen, Bruce',
'$first $last'
) as first_last
Insert cell
db
select regex_replace_all(
'dog',
'cat dog mouse dog',
'monkey'
)
Insert cell
Insert cell
Insert cell
import { DatasetteClient } from "@ambassadors/datasette-client"
Insert cell
db = new DatasetteClient("https://sqlite-extension-examples.fly.dev/data")
Insert cell
import { importCell } from "@mbostock/dataflow"
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more