Answer the question
In order to leave comments, you need to log in
MS SQL How to access the database by restoring from a backup?
I was given a database backup in .bak format and restored it using Microsoft SQL Server Management Studio to a local SQL Server. When creating a connection in VS, there is no restored base. I understand that you need to reconfigure users and privileges for the database, but I'm not strong in SQL Server, at all.
Answer the question
In order to leave comments, you need to log in
Regular expressions are not needed here:
UPD. It turns out that the author of the question from the first time was not able to tell what he needed. Taken from the comments:
Oh how. Well, I, in turn, will continue to insist on the uselessness of regular expressions. We create an element, put a string into it, look for the necessary elements, get their markup:
const div = document.createElement('div');
div.innerHTML = str;
const imgsStr = [...div.querySelectorAll('img[src*="/test/"]')].map(n => n.outerHTML).join('');
const imgsStr = Array.from(
new DOMParser().parseFromString(str, 'text/html').querySelectorAll('img[src*="/test/"]'),
n => n.outerHTML
).join('');
const div = document.createElement('div');
div.innerHTML = str;
div.querySelectorAll('img[src*="/test/"]').forEach(n => n.remove());
str = div.innerHTML;
const d = new DOMParser().parseFromString(str, 'text/html');
d.querySelectorAll('img[src*="/test/"]').forEach(n => n.remove());
str = d.body.innerHTML;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question