JavaScript RegEx for extracting value from HTML tag?

This should work for your specific example.

.0-9+/ : /,\.0-9+/; var match = myregexp. Exec(tagtext); if (match! = null) { result = match0; } else { result = ""; } alert(result); Working demo - jsfiddle.net/ipr101/LHBp7.

I could have "+4,13" or "0.00" or again "-7,698". How do I have to modify it? – Fabio B.

Sep 12 at 10:13 I can accept your answer if you reply to my comment ;) – Fabio B. Sep 12 at 10:16 1 I've just updated the answer, I've changed the RegEx so it will accept a full stop as well as a comma. – ipr101 Sep 12 at 10:21 one last thing, kind man :))) how can I "keep" the plus or minus (optionally set)?

– Fabio B. Sep 12 at 10:28 1 Answer updated again, set the boolean value to "keep" the plus or minus – ipr101 Sep 12 at 10:42.

D+(?:,. \d+)? See it here on Regexr Matches for an optional + or - then at least one digit, then an optional fraction with a .

Or a , as fraction delimiter. /Edit Try something like this (^See it here on Regexr If you want to exclude the + than add it (maybe optional) before the capturing group \+?(.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions