Jump to content

quick regex help


uswebpro

Recommended Posts

There´s no need for regular expressions to do what you want, take a look at the [url=http://www.php.net/sscanf]sscanf()[/url] function.

ex:
[code]<?php

$string = '1256twq';
list($numbers, $letters) = sscanf($string, "%d%s");

echo "Numbers: $numbers<br />Letters: $letters";

?>[/code]
Link to comment
https://forums.phpfreaks.com/topic/25398-quick-regex-help/#findComment-116082
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.