Yybb_cx.
Yybb_xdf.
Just like the string above. I just need _ back and. Letters in front
For example, the above two I need is CX and xdf what should be done?
Reply to discussion (solution)
$s =<<
Is this the replacement of the original?
$s =<<
Brother, I haven't done PHP. Don't be so complicated.
In fact, I want to be very simple, that means
$datas = $_post["Shujuku"]; I've got a string sent to $datas that string is yybb_xdf. That's what it looks like.
I need to put this $datas in accordance with my request. The string between _ and. is assigned to a new variable.
Preg_match ('/_ (. +?) \./s ', $data, $m); $a = $m [1]; $a is the variable you want.
Preg_match ('/_ (. +?) \./s ', $data, $m); $a = $m [1]; $a is the variable you want.
Brother.. Only one point ...
I took the. Before and after the letter I now use your last variable $ A to marry only one.
No way, just post your code to see it.
I don't like the regular, so intercept.
$a = "yybb_cx."; $a = substr (substr ($a, 5), 0,-1); Echo $a;
No, I got it wrong. should not be. before. Only need to underline the letter can!!!
$a = "yybb_cx."; $a = substr ($a, 5); Echo $a;
$s = ' yybb_cx. '; Strtok ($s, ' _ '); $a = Strtok ('. '); echo $a; Cx