S
shadbo
I am a perl newbie and I seem to be getting incorrect results from the
index function.
I have a var $string_to_find, which has a value of 'paris'. The string
I am searching has a 'paris' in there and 'pari' I want to extract the
position of 'paris' and not 'pari'. The code below seems to be finding
the position of the first one (pari), which i don't need.
Is it possible to combine regex with the index funtion so it only
searches for 'paris'?
$string_position = index($line,$string_to_find)
Any suggestions would be greatly appreciated.
Thanks
index function.
I have a var $string_to_find, which has a value of 'paris'. The string
I am searching has a 'paris' in there and 'pari' I want to extract the
position of 'paris' and not 'pari'. The code below seems to be finding
the position of the first one (pari), which i don't need.
Is it possible to combine regex with the index funtion so it only
searches for 'paris'?
$string_position = index($line,$string_to_find)
Any suggestions would be greatly appreciated.
Thanks