Results of 1 - 10 of about 12 for regex (0.004 sec.)
- Text Functions 12929
- Text Functions and Operators This section describes functions and operators for examining and manipulating STRING values . Function Description string[index] Extracts a single character using a (1-based) index . string[begin:end] Extracts a
...epted. string LIKE target Returns true if the string matches the like specifier (see Pattern Matching ). string SIMILAR TO regex Returns true if the string matches the regex (see Pattern Matching ). string ^@ search_string Alias for starts_with . arg1...file with invalid UTF-8 an error is thrown suggesting to use read_blob instead. See the read_text guide for more details. regexp_escape(string) Escapes special patterns to turn string into a regular expression similarly to Python's re.escape function.... regexp_extract(string, regex[, group][, options]) If string contains the regex pattern, returns the capturing group specified by... - https://man.mtool.work/duckdb/2.0/sql/functions/text.html
- Regular Expressions 12434
- DuckDB offers pattern matching operators ( LIKE , SIMILAR TO , GLOB ), as well as support for regular expressions via functions. Regular Expression Syntax DuckDB uses the RE2 library as its regular expression engine. For the regular express
...ion syntax, see the RE2 docs . Functions All functions accept an optional set of options . Name Description regexp_extract(string, pattern[, group = 0][, options]) If string contains the regexp pattern , returns the capturing group spec...string. The group must be a constant value. If no group is given, it defaults to 0. A set of optional options can be set. regexp_extract(string, pattern, name_list[, options]) If string contains the regexp pattern , returns the capturing groups as a...ruct with corresponding names from name_list ; otherwise, returns a struct with the same keys and empty strings as values. regexp_extract_all(string, regex[, group = 0][, options]) Finds non-overlapping occurrences of regex in string and returns the c... - https://man.mtool.work/duckdb/2.0/sql/functions/regular_expressions.html
- Result Verification 9215
- The standard way of verifying results of queries is using the query statement, followed by the letter I times the number of columns that are expected in the result. After the query, four dashes ( ---- ) are expected followed by the result v
...ages is changed. statement error SELECT * FROM non_existent_table; ---- Table with name non_existent_table does not exist! Regex In certain cases result values might be very large or complex, and we might only be interested in whether or not the resul...t contains a snippet of text. In that case, we can use the <REGEX>: modifier followed by a certain regex. If the result value matches the regex the test is passed. This is primarily used f...LAIN SELECT tbl.a FROM 'data/parquet-testing/arrow/alltypes_plain.parquet' tbl(a) WHERE a = 1 OR a = 2 ---- physical_plan <REGEX>:.*PARQUET_SCAN.*Filters: a=1 OR a=2.* If we instead want the result not to contain a snippet of text, we can use the <!RE... - https://man.mtool.work/duckdb/2.0/dev/sqllogictest/result_verification.html
- Python Client API 8313
- Connection class duckdb. Appender Bases: object append_row ( self , * args ) → None Buffer one row, one value per column, each converted as an executemany parameter would be append_rows ( self , rows : object ) → None Buffer each row of an
...n': ('path_join', 0, ['VARCHAR']), 'prefix': ('prefix', 0, ['VARCHAR', 'VARCHAR']), 'printf': ('printf', 0, ['VARCHAR']), 'regexp_escape': ('regexp_escape', 0, ['VARCHAR']), 'regexp_extract': ('regexp_extract', 0, ['VARCHAR', 'VARCHAR']), 'regexp_extr...act_all': ('regexp_extract_all', 0, ['VARCHAR', 'VARCHAR']), 'regexp_full_match': ('regexp_full_match', 0, ['VARCHAR', 'VARCHAR']), 'regexp_...matches': ('regexp_matches', 0, ['VARCHAR', 'VARCHAR']), 'regexp_replace': ('regexp_replace', 0, ['VARCHAR', 'VARCHAR', 'VARCHAR']), 'replac... - https://man.mtool.work/duckdb/2.0/clients/python/reference/
- PostgreSQL Compatibility 8277
- DuckDB's SQL dialect closely follows the conventions of the PostgreSQL dialect. The few exceptions to this are listed on this page. Floating-Point Arithmetic DuckDB and PostgreSQL handle floating-point arithmetic differently for division by
...greSQL does not do this. For an example, run: SELECT ARRAY['''']; PostgreSQL returns: {'} DuckDB returns: ['\''] Functions regexp_extract Function Unlike PostgreSQL's regexp_substr function, DuckDB's regexp_extract returns empty strings instead of NUL...r Expression Match Operators PostgreSQL supports the POSIX regular expression matching operators ~ (case-sensitive partial regex matching) and ~* (case-insensitive partial regex matching) as well as their negated variants, !~ and !~* , respectively. B...y default, DuckDB follows the same semantics: ~ maps to regexp_matches (case-sensitive partial matching), ~* performs case-insensitive partial matching, and !~ and !~* are their negate... - https://man.mtool.work/duckdb/2.0/sql/dialect/postgresql_compatibility.html
- Migrating to DuckDB 2.0 7977
- DuckDB 2.0.0 is packed with new features and performance improvements, including query optimization and asynchronous I/O. It also ships a small set of breaking changes, most notably a new default storage format, which DuckDB versions before
...rtial regular expression matching , following PostgreSQL: 'abc' ~ 'b' now returns true (previously false ). The deprecated regex_match_operator_semantics setting restores full matching: SET regex_match_operator_semantics = 'full'; The factorial operat... - https://man.mtool.work/duckdb/2.0/operations_manual/migration.html
- Benchmark Suite 7853
- DuckDB has an extensive benchmark suite. When making changes that have potential performance implications, it is important to run these benchmarks to detect potential performance regressions. Getting Started To build the benchmark suite, ru
...ression You can also use a regular expression to specify which benchmarks to run. Be careful of shell expansion of certain regex characters (e.g., * will likely be expanded by your shell, hence this requires proper quoting or escaping). build/release/... - https://man.mtool.work/duckdb/2.0/dev/benchmark.html
- Configuration 7818
- DuckDB has a number of configuration options that can be used to change the behavior of the system. The configuration options can be set using either the SET statement or the PRAGMA statement . They can be reset to their original values usi
...bled. BIGINT -1 redact_http_logs Redact HTTP header values in logs unless their names are explicitly allowed. BOOLEAN true regex_match_operator_semantics Configures whether regex match operators use partial or full string matching. VARCHAR partial s3_... - https://man.mtool.work/duckdb/2.0/configuration/overview.html
- Analyzing a Git Repository 7818
- You can use DuckDB to analyze Git logs using the output of the git log command . Exporting the Git Log We start by picking a character that doesn't occur in any part of the commit log (author names, messages, etc). Since version v1.2.0, Duc
...e question: which topic was the most commonly mentioned in the commit messages: CI, CLI, or Python? SELECT message.lower().regexp_extract('\b(ci|cli|python)\b') AS topic, count(*) AS num_commits FROM commits WHERE topic <> '' GROUP BY ALL ORDER BY num...s in the commit messages. To do so, we first tokenize the messages: CREATE TABLE words AS SELECT unnest( message .lower() .regexp_replace('\W', ' ') .trim(' ') .string_split_regex('\W') ) AS word FROM commits; Then, we remove stopwords using a pre-def... - https://man.mtool.work/duckdb/2.0/guides/snippets/analyze_git_repository.html
- Pattern Matching 7818
- There are four separate approaches to pattern matching provided by DuckDB: the traditional SQL LIKE operator , the more recent SIMILAR TO operator (added in SQL:1999), a GLOB operator , and POSIX-style regular expressions . LIKE The LIKE ex
...DuckDB supports some PostgreSQL-style operators for regular expression matching: PostgreSQL-style Equivalent expression ~ regexp_matches !~ NOT regexp_matches ~* regexp_matches with case-insensitive matching !~* NOT regexp_matches with case-insensiti...default, these operators perform partial matching, following PostgreSQL's semantics. This is controlled by the deprecated regex_match_operator_semantics setting. Setting it to full restores the legacy behavior in which ~ and !~ map to regexp_full_mat... - https://man.mtool.work/duckdb/2.0/sql/functions/pattern_matching.html
DuckDB 2.0 Documentation / man.mtool.work