jquery - How to extract substring between specific characters in javascript -


how extract "51.50431" , "-0.1133" latlng(51.50431, -0.1133) using jquery.

tried using substring() not helpful numbers in latlng(51.50431, -0.1133) keep on changes in different ranges. time can come latlng(51.50, -0.1). help?

regular expressions rescue:

'latlng(51.50, -0.1)'.match(/latlng\(([^,]+),\s*([^)]+)\)/)  // ["latlng(51.50, -0.1)", "51.50", "-0.1"] 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -