Ng pattern to accept pipe separated input in AngularJs [closed] - javascript

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I have a form and I want to accept pipe separated values for a particular field only in the format
4 digits|8digits|any number of digits.
I tried using ^\d{1,6}(|\d{1,6}){3}
But this is wrong.

Try \d{4}\|\d{8}\|\d* if the any number of digits can be 0, if not, then try \d{4}\|\d{8}\|\d+

Related

Why does using float instead of int give me different results when all of my inputs are integers? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 days ago.
Improve this question
enter image description here
pless chek and send that solutioon
i need solutioon pless comment

Empty Guid string displays as 0 in angular/typescript [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
I would like to understand why the following behavior happens.
Take a look at my Stackblitz example here
I need the "00000000-0000-0000-0000-000000000000" empty guid, to stay in the same format, but for some reason, Typescript changes it to a value 0.
Why is this happening?
Fixed it with this.
[value]="'00000000-0000-0000-0000-000000000000'"
So it is now a string.

Regex replace +46 to 0 JavaScript [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I'm trying to learn regex. I need to find +46 and replace it with 0. I've been racking my brain but I can't figure out the correct syntax. I'm trying to do it in JS with replace.
Any takers?
Use .replace():
"987654321+46".replace("+46", "0")

Regex Javascript except [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
i need to match string with "adwords**" except adwordsPE
my input
adwordsPW
adwordsPE
adwordsWE
need to output
adwordsPW - true
adwordsPE - false
adwordsWE - true
Try with:
adwords(?!PE)[A-Z]{2}
DEMO

Add space after three numbers [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I'm trying to have my numbers in a format that is easier for the user to read.
Eg. Instead of: 12349568483, it would be: 12 349 568 483.
I was wondering if there is a simple way to do this?
var a = "12349568483";
a = a.split('').reverse().join('').replace(/([0-9]{3})/g, "$1 ").split('').reverse().join('');

Categories

Resources