i am working in regex my regex is /\\[([^]\\s]+).([^]]+)\\]/g this works great in PHP for [http://sdgdssd.com fghdfhdhhd]
but when i use this rege
I would like to add this little fact about translating PHP preg_replace Regex in JavaScript .replace Regex :
Result : "-1220025.47"
with PHP, you have to use the quotes "..." around the Regex, a point comma to separate the Regex with the replacement and the brackets are used as a repetition research (witch do not mean the same thing at all.
Result : "-1220025.47"
With JavaScript, no quotes around the Regex, a comma to separate Regex with the replacement and you have to use /g option in order to say multiple research in addition of the /i option (that's why /ig).
I hope this will be usefull to someone !
Note that the "\," may be suppressed in case of "1,000.00 $" (English ?) kind of number :
Result : "-1220025.47"