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

rdbms - what exactly the undo information lives in oracle? -

bash - How do you programmatically add a bats test? -

java - Getting exception in JDBC thin driver -