Linked Questions

1 vote
2 answers
1k views

For example: I want to match duplicate characters that are separated by other characters: Matching stress should return sss Matching lambda should return aa Matching moonmen should return moonmn I am ...
TheWandererLee's user avatar
-2 votes
3 answers
2k views

I am creating function in which I will pass String and Specific text.The specific text should be bold in whole string. I want to achieve this but unable do that. Input string:-"Hi Hello boy Hello ...
Sharad kumar's user avatar
0 votes
3 answers
633 views

Probably I am not able to achieve this because I don't know much about regEx. I have an array of unique links uniqueLinks. Whenever those links appear in the HTML code I have my textarea, I want ...
wiredmark's user avatar
  • 1,108
2 votes
3 answers
2k views

I want to make only matched string bold. Say, I have a string "Hello, World!" and user searched for "hello". I want to make something like this, "Hello, World!". I have ...
Abid Hasan's user avatar
1 vote
2 answers
2k views

I have a string which has html content in it. Something like this const text = "My name is Alan and I <span>an</span> <div class="someClass">artist</div>." I render this ...
pogbamessi's user avatar
3 votes
2 answers
100 views

This is what I do: var input_string = "(1) (1) test.txt"; var reg = new RegExp('^\\(\\d+\\)\\s+' + input_string,'i'); var tested_string = "(1) (1) (1) test.txt"; alert(reg.test(tested_string)); // ...
Jacobian's user avatar
  • 11.1k
0 votes
2 answers
1k views

I am new to JavaScript so I am struggling to even know where to start. Please can someone help me. I have what I have tried something as shown below but it is nothing like the desired output as I have ...
Dilhan Bhagat's user avatar
1 vote
2 answers
877 views

I'm working on an autocomplete component that highlights all ocurrences of searched text. What I do is explode the input text by words, and wrap every ocurrence of those words into a My code looks ...
maxijb's user avatar
  • 531
1 vote
2 answers
1k views

For some reason… When ever I try to get the Object.keys from replace.letters and use the Object.keys in a new RegExp joined by |… The new RegExp only recognize some of the Object.keys but not all of ...
Allen Marshall's user avatar
2 votes
1 answer
628 views

In our Azure CICD Pipeline, we have an element where we are trying to deploy Policies. We have JSON file per policy in the repo and we bring all these json files together into one file as part of CI ...
Raymondo's user avatar
  • 607
0 votes
1 answer
1k views

using Mongodb in my meteor application I am making a query using regular expression to check if the name or code is already available in the database or not. In my string all the numbers and special ...
Sajid Ahmad's user avatar
  • 1,144
-1 votes
2 answers
765 views

Here's what I'm trying to do. Honestly, I'm not even sure where to start. var text1 = 'ThE foX iS brown', text2 = 'the fox is brown the fox is brown THE FOX IS BROWN', index = text2....
isuckatcoding's user avatar
0 votes
5 answers
336 views

I'd like to remove whole string if the string inside brackets has the word ppm. Simply remove whole bracket if the word ppm inside. How do I do this? "Menthol(0.3ppm)" ===> "...
ton1's user avatar
  • 7,668
-1 votes
2 answers
295 views

I'm trying to write a regexp which should return true if a given string foo ends with the given string bar. E.g: function solution(str, ending) { var pattern = "/" + ending + "$/"; var regex = ...
Ali's user avatar
  • 268k
0 votes
4 answers
742 views

I have this list of ingredients I am trying to make a regex to look for 1 cup , or 1 tsp or 1 tablespoon and so on..... I have made this regex but It doesn't work as well. I am trying separate ...
Dilhan Bhagat's user avatar

15 30 50 per page