Skip to main content

All Questions

3 votes
2 answers
2k views

Removing empty lines in Google Docs

I have some text in google docs. • line 1• line 2• line 3 I would like to find an automated way to make this text line 1 line 2 line 3 (with no empty lines between each bullet) I used google apps ...
bryanvernon's user avatar
0 votes
1 answer
161 views

String between two "*" or "_" characters not getting bold or italic

Suppose there is string wrapped with two * characters (from both starting and ending). The resulting string should be converted in bold text, similarly as when the string is wrapped with two ...
Kavya Pathak's user avatar
3 votes
2 answers
420 views

How to format a JavaScript string with replaceAll using regex

I am trying to format a kind of a board game notation which consists of tabs and spaces. The original string is looking like this: 1. \td11-d9 \te7-e10 \n2. \ta8-c8 \tg7-g10xf10 \n3. ...
Plamen Draganov's user avatar
0 votes
1 answer
1k views

Formatting input value using javascript as the user types a value into the input field

I have an input field of length 14 into which the user types a value. As the user types into it, I would like a space to be added automatically after first 2 characters and then after next 3 ...
suvenk's user avatar
  • 517
1 vote
1 answer
430 views

Input format(mask) like vue directive

I need a behavior when I enter in input like that: only numbers are available for entering the last two digits entered are separated from the previous ones by a dot For example: Keyboard input "...
Nickolay Kapitanov's user avatar
0 votes
1 answer
20 views

Javascript - Go through textfield and search for values

I might be overthinking this, but I have a web application where there's a text field containing css code as text. I want to programatically look for values containing # values and pass those through ...
Kenny Bones's user avatar
  • 5,139
19 votes
6 answers
74k views

React - How to format phone number as user types

I need to format a 10 digit string to this format: '(123) 456-7890'. However, I need this to happen as the user types. So if the user has inputted only 3 digits, the input should display: '(123)'. If ...
user avatar
1 vote
2 answers
2k views

Regex: Slack-like 'markdown' for matching exactly one formatting character

I've tried researching this but could only figure out how to make my search terms so precise. I want the user to be able to surround text with symbols, _, *, ~, etc. for markdown-like formatting, ...
mccambridge's user avatar
  • 1,022
2 votes
6 answers
12k views

remove comma separation from the specific number from JS

I want to remove comma separation from the specific number but i want decimal places and i wrote a regular expression for that, when i pass a number with decimal places it is ok. var num = '12,312,...
samm's user avatar
  • 33
0 votes
1 answer
779 views

Passing display value format to angular component

I would like to pass the formatting of a display value to an angular component. For example: format="'(utc, offset) location (tz)'" === '(UTC -04:00) New York (EDT)' or format="'(tz, offset) ...
Jimmy's user avatar
  • 428
1 vote
2 answers
2k views

JavaScript Regex to format phone with n any characters for extension

I have the following function in JavaScript, which takes in text for a USA phone number, tests against it to make sure nothing invalid is inputted, then formats it for display in the same text box. ...
Stephanie Fischer's user avatar
0 votes
2 answers
42 views

Cities FR formatter cases

I searching a function which can convert the input of user as new output with specific rules. This rule is : First letter uppercase (e.g: Paris) If string contains two dashes (-) between each words, ...
Kévin Vilela Pinto's user avatar
1 vote
3 answers
4k views

jQuery Validating Australian Phone Numbers

I am trying to get the value from an input box, validate & format the number, then update the input field. I want it to validate all Australian phone numbers (mobile and landline) formatting ...
NickOS's user avatar
  • 804
0 votes
2 answers
124 views

Clever time formatting with JavaScript

I need help writing a little Regular Expression to replace integers into a time format string in a text input field. In my form: I have a text input field where I'm supposed to write numbers. And ...
Alex's user avatar
  • 530
1 vote
1 answer
129 views

How to extend this regex to match this mask?

I have found the following solution for adding dashes after every 4th character: $('.number_to_format').keyup(function() { var foo = $(this).val().split("-").join(""); if (foo.length > 0) { ...
David's user avatar
  • 23

15 30 50 per page