{"id":122,"date":"2010-12-18T11:45:00","date_gmt":"2010-12-18T17:45:00","guid":{"rendered":"https:\/\/www.chrystalsander.com\/blog\/?p=122"},"modified":"2010-12-18T11:45:00","modified_gmt":"2010-12-18T17:45:00","slug":"extracting-a-number-from-a-string-using-regex","status":"publish","type":"post","link":"https:\/\/www.chrystalsander.com\/blog\/?p=122","title":{"rendered":"Extracting A Number From A String Using Regex"},"content":{"rendered":"<p style=\"margin: 0in 0in 0pt;\">          static string ExtractNumbers(string expr)<\/p>\n<p style=\"margin: 0in 0in 0pt;\">          {<\/p>\n<p style=\"margin: 0in 0in 0pt;\">          <span style=\"\"> <\/span>return string.Join(null,System.Text.RegularExpressions.Regex.Split(expr,          &#8220;[^\\d]&#8221;));<\/p>\n<p style=\"margin: 0in 0in 0pt;\">          }<\/p>\n<p>Call as   follows:                      <\/p>\n<p style=\"margin: 0in 0in 0pt;\">         <\/p>\n<p style=\"margin: 0in 0in 0pt;\">\n<p>                Response.Write (ExtractNumbers(&#8220;12EFR77&#8221;));<\/p>\n","protected":false},"excerpt":{"rendered":"<p>static string ExtractNumbers(string expr) { return string.Join(null,System.Text.RegularExpressions.Regex.Split(expr, &#8220;[^\\d]&#8221;)); } Call as follows: Response.Write (ExtractNumbers(&#8220;12EFR77&#8221;));<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"_links":{"self":[{"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/122"}],"collection":[{"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=122"}],"version-history":[{"count":0,"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/122\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}