#include <iostream>
#include <string>
#include <regex>
using namespace std;

int main()
{

    std::string line("A50. hsih Y0 his ");
    std::smatch match;
    std::regex reg("[A][-+]?([0-9]*\\.[0-9]*|[0-9]+)");   

    if ( std::regex_search(line,match,reg) ){
            cout << match.str(0) << endl;

        }else{
            cout << "nothing found" << endl;
        }

  return 0;
}