A regular expression matches a string

has the following string: ab Ac126 Hello 123-sharp 121a No bc13ab Hello a1b35-sharp a791 Ah 326bop Hello cagf1-sharp 38a good 1

needs to match so that does not contain the string "Hello. *?-sharp" (the character between "Hello" and "- sharp" is a variable). The matching result is as follows:
ab A c126121a does not bc13aba791, 326bop38a good 1

could you tell me how to write the corresponding rules?
I use [^ Hello. *?-sharp] to match, and the intermediate variables also match

.
Apr.03,2021

it's faster and easier to use replace in this scenario! It does not change the original string. It is difficult to match all the strings of that are not a character string using js's rules alone, so I recommend you use reverse thinking to replace the strings you want to exclude.

var x= 'abc126123-sharp121abc13aba1b35-sharpa791326bopcagf1-sharp38a1';
var y = x.replace(/.*?-sharp/g, "");
console.log(y);

var str = 'abc126123-sharpa791abc13aba1b35-sharpa791326bopcagf1-sharpa791'
var newStr = str.replace(/[\u4f60|\u597d|\.|\*|\?|\-sharp]/g, '');

console.log(newStr); 
// 'abc126a791abc13aba791326bopa791'

unicode.*?-sharp

var str="abc126123-sharp121abc13aba1b35-sharpa791326bopcagf1-sharp38a1";
str.split(/[^-sharp]*-sharp/);

or

var str="abc126123-sharp121abc13aba1b35-sharpa791326bopcagf1-sharp38a1";
str.replace(/[^-sharp]*-sharp/g,"");
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b4498a-2bf73.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b4498a-2bf73.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?