Answer the question
In order to leave comments, you need to log in
How to write a regexp to search for a sequence of numbers without considering the character between them?
The essence of the question is as follows - you need to find a sequence of 7 or more numbers in the text, between which there may be spaces and other characters. Wrote such an expression - /((\d.*){7,})/im
. But, unfortunately, there is a behavior that is incomprehensible to me - for some reason it works on such text -
Assignment structure
1. Introduction (200 words)
Brief description of your chosen company
2. Theory section (300 words)
Explain the theories and frameworks on cultures, institutions, internal organization, foreign entry strategy and CSR that you are going to use in your analysis .
array (size=3)
0 => string '1. Introduction (200 words) Brief description of your chosen company 2. Theory section (300 words) Explain the theories and frameworks on cultures, institutions, internal organisation, foreign entry strategy and CSR that you are going to use in your analysis. ' (length=260)
1 => string '1. Introduction (200 words) Brief description of your chosen company 2. Theory section (300 words) Explain the theories and frameworks on cultures, institutions, internal organisation, foreign entry strategy and CSR that you are going to use in your analysis. ' (length=260)
2 => string '0 words) Explain the theories and frameworks on cultures, institutions, internal organisation, foreign entry strategy and CSR that you are going to use in your analysis. ' (length=170)
Answer the question
In order to leave comments, you need to log in
Thank you all for your help, tips and comments.
In the end, I settled on this option -/([+() ]*(\d[+()\- ]*){7,})/m
Since the task has been set now, here is your sequence of numbers regexr.com/3da44 ))
<?php $this->widget('bootstrap.widgets.TbGridView',array(
'id'=>'ref-mahala-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
'id',
array(
'name' => 'district_id',
'value' => '$data->region->name',
),
'name_ru',
'name_uz',
'name_en',
'address_ru',
array(
'class'=>'bootstrap.widgets.TbButtonColumn',
),
),
)); ?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question