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")
Related
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 days ago.
Improve this question
If fixRightEdge: true is set, then rightOffset: 20 doesn't work.
How to make it work? Perhaps this can be changed in the lightweight-charts.standalone.production.js file itself?
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.
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
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 got a result "\r\n5".
I want to remove "\r\n" and take only number 5.
How do i take the number and remove "\r\n" using javascript replace function.
please anyone help me.
Why do you want to use replace us this
"\r\n5".match(/\d+/)[0]
The trim() method returns the string stripped of whitespace from both ends. trim does not affect the value of the string itself.,should be work
"\r\n5".trim();
JS FIDDLE
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('');