Given string:
QString unformatted =
"Some non arabic text"
"بعض النصوص العربية"
"Another non arabic text"
"النص العربي آخر";
How to reach following result using QRegExp
or other way:
"<p>Some non arabic text</p>"
"<p dir='rtl'>بعض النصوص العربية</p>"
"<p>Another non arabic text</p>"
"<p dir='rtl'>النص العربي آخر</p>";
Thanks!
Function to separate by arabic expressions:
Example:
Output: