Information

Https sis cat com

Https sis cat com


We are searching data for your request:

Forums and discussions:
Manuals and reference books:
Data from registers:
Wait the end of the search in all databases.
Upon completion, a link will appear to access the found materials.

Https sis cat com-b-c net-r-r-a-l

sis.com/f/t/h/l/r/r/r/

I would like to match:

sis.com/f/t/h/l/r/r/r/

with

$match_count = 3,

Here is what I've tried so far:

$url ='sis.com/f/t/h/l/r/r/r/',

preg_match('/sis.com/(f|h|l|r|r)/', $url, $matches, PREG_OFFSET_CAPTURE),

echo $matches[1][0],

A:

This should do it:

$url ='sis.com/f/t/h/l/r/r/r/',

preg_match('/(sis.com/f|sis.com/h|sis.com/l|sis.com/r)/', $url, $matches, PREG_OFFSET_CAPTURE),

// Outputs:

// array (

// 0 =>, array (

// 0 =>, 0,

// 1 =>, 25,

// 2 =>, 29,

// ),

// 1 =>, array (

// 0 =>, 30,

// 1 =>, 37,

// 2 =>, 45,

// ),

// )

Demo.

Note that / is the default delimiter for preg_match, so you can remove it from the pattern.

EDIT: I've updated the pattern to remove the need for PREG_OFFSET_CAPTURE.


Watch the video: CATERPILLAR SIS CAT ET CBT (May 2022).


Comments:

  1. Renzo

    I can't join the discussion right now - very busy. But osvobozhus - necessarily write what I think.

  2. Khya

    In it something is also to me it seems it is excellent idea. Completely with you I will agree.

  3. Tejora

    Now everything is clear, thanks for the help in this question.

  4. Wynn

    Excuse me for not being able to participate in the discussions now - there is no free time. But I will be released - I will definitely write that I think on this question.



Write a message

Video, Sitemap-Video, Sitemap-Videos