Skip to main content

All Questions

Tagged with
-3 votes
0 answers
48 views

Fetch specific string inside double brackets [closed]

Using the following regex \{{.*?\}} to match any strings inside double brackets. However, I need to modify it to fetch a specic string inside those brackets `5 => {{instance.label}}` I'd like to ...
David Garcia's user avatar
  • 2,698
-1 votes
0 answers
43 views

how to convert Markdown lists to HTML in JavaScript [closed]

i really have no idea how to convert Markdown list to HTML and i need to do it not using any js package i already implemented most of tags but im having really hard time with lists i manage to get ...
slicnake's user avatar
-1 votes
0 answers
73 views

JavaScript and regex [duplicate]

Considering the string below, I want to extract the value from data-frame-src I believe this regex should do the trick, but I'm not getting matches. Can anyone give me a hand? console.log(desc.match(/...
fslap's user avatar
  • 69
-1 votes
2 answers
86 views

Replace '?' with '\?' [closed]

How to achieve output string: hm\? Testing code below without success: const test = (str) => console.log(JSON.stringify(str)) // for proper display of escape characters test('hm?'.replace('?', '\?'...
Matej Vesel's user avatar
-1 votes
0 answers
50 views

How to get substring from nested braces using regular expressions [duplicate]

Is there a way to get a substring from a string with nested curly braces where the nesting level is not fixed using regular expressions with pure javascript? For example, we need to get the some text ...
DZN's user avatar
  • 1,614
0 votes
1 answer
31 views

Custom validation to exclude trailing spaces in text responses in Qualtrics

I'm building a Qualtrics form that requires a respondent to enter their email address. That question is a single line text entry question type. The email address being typed correctly matters because ...
Mary Rachel's user avatar
4 votes
2 answers
112 views

Validating Thickness (Margin/Padding) string using Regex for different platforms

I have a specific Regex pattern requirement for a string pattern which contains margin/padding (Thickness) for max 3 different platform and devices separated by semicolon. Margin and Padding format is ...
programmerboy's user avatar
0 votes
6 answers
124 views

Remove Leading 0s from Date Formatted mm/dd/yyyy

I have a date formatted like such: 04/09/2024 10:45 I am trying to remove leading zeros when they exist in the month and day. I have been trying to do this with regex but am struggling to get the ...
D. Fowler's user avatar
1 vote
1 answer
30 views

Klipper Syntax Highlighter using Highlight.JS

I'm trying to create a syntax highlighter for the Klipper 3D printer firmware. The language consists of settings elements, comments and Jinja2 template elements. In the first place, I wanted to get a ...
Tom's user avatar
  • 91
-5 votes
0 answers
34 views

Regex failing to validated an url [duplicate]

For a long time I have been using the regex as in this page in my app without any problems but today I tried this url : https://my3dviewer.visiativ.com/#/publications/617864759 but it didn't pass the ...
Bardelman's user avatar
  • 2,298
1 vote
0 answers
66 views

Regular expressions loop code, how Backtracking works?

Following the brilliant presentation of "Damian Conway" on how regular expression work, I have taken his pseudo-code and used my own example to try to understand it. (see for reference the ...
rafmartom's user avatar
2 votes
2 answers
74 views

Javascript regex : how to "update" a matching line using regex?

I have a variable containing a multiline string. This string is made of markdown formated text. I want to convert it a "Telegram" compliant markdown format. To convert titles (identified by ...
Tuckbros's user avatar
  • 475
-1 votes
0 answers
32 views

RegExp.test call influences subsequent string.matchAll [duplicate]

I found a strange behavior with javascript regular expressions in my vuejs project. It seems like RegExp.test() somehow influences subsequent calls of string.matchAll. Whenever I call test() before ...
Iyashi's user avatar
  • 580
5 votes
1 answer
122 views

Count actual replacements

Overview I've created a basic text editor with a "Replace all" feature. However, I'm facing an issue where the output indicates replacements were made even when the text remains unchanged. ...
Mori's user avatar
  • 6,962
2 votes
2 answers
151 views

Regex to remove substrings such as "Official Video", "Audio", "Music Video"... from string

I'm trying to clean YouTube video title from unnecessary words such as "Official Video", "Audio", "Music Video" etc. I need help constructing regex that I can use. What I ...
Milos Stojanovic's user avatar

15 30 50 per page
1
2 3 4 5
2499