Category : string

Have the function StringChallenge(str) read str which will contain two strings separated by a space. The first string will consist of the following sets of characters: +, *, $, and {N} which is optional. The plus (+) character represents a single alphabetic character, the ($) character represents a number between 1-9, and the asterisk (*) ..

Read more

Currently, I am requesting an external web service to get some important information. However, the dates this web services return me are something like this: 16/11/2020 12:00:00 a. m. So, I was in other implementations using a code like this to get the DateTime: $date = ’16/11/2020 12:00:00 a. m.’; $newDateTime = new DateTime($date); But ..

Read more

I’m trying to parse some data that is stored by a plugin, and I’m not familiar with what type of string this so I can lookup how to parse it into php. : a:10:{s:12:"cfdb7_status";s:6:"unread";s:18:"recipient-email__1";s:19:"[email protected]";s:12:"date-to-send";s:10:"2021-04-24";s:9:"your-name";s:3:"Jay";s:10:"your-email";s:19:"[email protected]";s:12:"your-message";s:13:"test schedule";s:15:"dynamictext-994";s:0:"";s:6:"bookId";s:0:"";s:1:"u";s:0:"";s:17:"dynamichidden-451";s:0:"";} How do I for example get the value of "your-name" field? Sourc..

Read more

I’ve the next code in a string: <div class="navbar-nav navbar-right"> <span class="text-muted my-2 my-sm-0 mx-2">@lang(‘Welcome, user’, [‘user’=> $user]). {{ $login }} {!! $adminBadge !!}</span> </div> <div class="navbar-nav navbar-right"> <a href="{{ route(‘logout’) }}" class="btn btn-outline-success my-2 my-sm-0" role="button">@lang(‘menu.close_session’)</a>@lang(‘This is a very @lang("gag") complex string’) another {{ __(‘call example’) }} call </div> The question is taht I ..

Read more

I’ve a string like this : %d8%b7%d8%b1%d8%a7%d8%ad%db%8c-%d8%a7%d9%be%d9%84%db%8c%da%a9%db%8c%d8%b4%d9%86-%d9%81%d8%b1%d9%88%d8%b4%da%af%d8%a7%d9%87%db%8c the meta tag of page is set to utf-8 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> i want to convert this unicode to pure readable utf-8 string I’ve tested lots of code ,thie is my last code : function convertFarsi($str) { return html_entity_decode(preg_replace(‘/\u([a-f0-9]{4})/i’, ‘&#x$1;’, $str),ENT_QUOTES, ‘UTF-8′); } and it doesn’t work. ..

Read more