What is the right way to write regular expression in C++?

Having hard time writing below regex expression in C++ (?=[a-zA-Z])*(?=[\s])?(00|\+)[\s]?[0-9]+[\s]?[0-9]+(?=[\sa-zA-Z])* Example string: “ABC + 91 9997474545 DEF” Matched string must be: “+ 91 9997474545” C++ code : #include <iostream> #include <regex> using namespace std; int main() { string a = “ABC + 91 9997474545 DEF”; try { regex b(“(?=[a-zA-Z])*(?=[\\s])?(00|\\+)[\\s]?[0-9]+[\\s]?[0-9]+(?=[\\sa-zA-Z])*”); smatch amatch; if ( regex_search(a, amatch,…

Details

find data by column name using gethibernatetemplate from table

public List<Donatenow> getdonationdetails(String username) { System.out.println(“aaaaa”+username); List<Donatenow> dnm=getHibernateTemplate().find(“from Donatenow where Mobile=?”,username); System.out.println(“spot”+dnm); return dnm; } output: aaaaa9876543210 spot[] ———— here, query don’t execute when i do this code. if i use String “9876543210” instead of username then it’s work.

Details

Is there a method to call activity back when onStop() immediately?

I want to create an app that can’t be stopped (send to background). Is there a method to achieve this? this is my code @Override protected void onUserLeaveHint() { Intent i = new Intent(this, DemoActivity.class); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); i.setAction(Intent.ACTION_MAIN); i.addCategory(Intent.CATEGORY_LAUNCHER); i.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT & Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP); startActivity(i); } but this code didnt respond immediately, I search everywehere for solution but…

Details