skip to Main Content

How to highlight text in a string – Javascript

Vue and Quasar frameworks String: "Lorem ipsum dolor sit amet CONSECTETUR adipiscing elit" Template The following code does not work <span:class=""> {{ highlightSearchExpression(string) }} /> Using v-html (works inconsistently; merge search word with other words) <span v-html="highlightSearchExpression(string)" :class="" /> Method…

VIEW QUESTION

Regex match with a list of special characters is not working for comma, semicolon etc in Angular – Javascript

I am using this pattern for password validation. Validators.pattern('((?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!"#$%&`{|}~()*+,-.\:/;<=>?@[\]^_/']).{10,})'), But this validation is not working for ,;() etc but working for!@#$%^& These characters are need to be accepted- !"#$%&'()*+,-./:;<=>?@[]^_`{|}~ Can anybody suggest where the error is?

VIEW QUESTION
Back To Top
Search