I am looking for a regular expression pattern that matches the first character of a string.For example, I have two numbers: 011569875and 041568956If I find the first character 3 011, then Iโll print011569875
011569875
041568956
011
As suggested by @Mark, you can use substras follows:
substr
$string = substr($longstring,0,3); if($string == '011'){ echo $longstring; }
Hope this helps. Greetings
Source: https://habr.com/ru/post/1610631/More articles:How to disable Tomcat html error pages when my REST API returns 500 HTTP status - java(AS3) Get HTML character index in text field after word wrap - htmlLook at a string in an array with arbitrary sizes - rSignalR "Error during start request. Stopping connection." - c #File not exiting or not found - phpHow to designate the y axis when using the secondary y axis? - pythonHibernation is 1000 times slower than sql query - javaTask.WaitAny ะฟัะธะฝััั Task ะฒะผะตััะพ Task [] - genericsWhy is there no static QDir :: makepath ()? - qtHow to disable JavaScript function after clicking? - javascriptAll Articles