regular expression matching
Hello
after running the following code
create table dg_test (request varchar2(2000));
insert into dg_test values ('GET /chemical-oil-and-gas/invista-textiles-chemical-products-manufacture-1234567.htm HTTP/1.0');
insert into dg_test values ('GET /all-industry/invista-textiles-chemical-products-manufacture-2345678.htm HTTP/1.0');
insert into dg_test values ('GET /all-industry/products/boiler-solenoid-valve-3456789.htm HTTP/1.1');
insert into dg_test values ('GET /chemical-oil-and-gas/products/boiler-solenoid-valve-4567890.htm HTTP/1.1');
create table dg_sections (name varchar2(200));
insert into dg_sections values ('chemical-oil-and-gas');
insert into dg_sections values ('all-industry');
i want to extract the following (sudo code)
where dg_test.request like '%' || dg_sections.name || '/' || anytext (but no further forward slashes || '-' || 7digit number || '.htm%'
after running the following code
create table dg_test (request varchar2(2000));
insert into dg_test values ('GET /chemical-oil-and-gas/invista-textiles-chemical-products-manufacture-1234567.htm HTTP/1.0');
insert into dg_test values ('GET /all-industry/invista-textiles-chemical-products-manufacture-2345678.htm HTTP/1.0');
insert into dg_test values ('GET /all-industry/products/boiler-solenoid-valve-3456789.htm HTTP/1.1');
insert into dg_test values ('GET /chemical-oil-and-gas/products/boiler-solenoid-valve-4567890.htm HTTP/1.1');
create table dg_sections (name varchar2(200));
insert into dg_sections values ('chemical-oil-and-gas');
insert into dg_sections values ('all-industry');
i want to extract the following (sudo code)
where dg_test.request like '%' || dg_sections.name || '/' || anytext (but no further forward slashes || '-' || 7digit number || '.htm%'
0