This is a follow up from a previous question.
The regular expression is working fantastic however I need to be able to find out the exact location of the pattern occurrence. Like for example if my regular expression were to extract instances of the substring 'bob' from the following string:
This is abobsled
I want to also know the exact character position of the first occurrence of the pattern in the string i.e in this case its at the 10th character position - is this possible? I'm using php here.
==========================
Thanks I think I'm stuck again though - currently however this is what I want to do. Lets say I have a template of this nature:
Hello <=name=>
Take Care
From <=sender=>
Now thats easy as all the details are one words however in case the data to replace a tag extends over multiple lines I want to set it sup so it maintains a bit of formatting like currently the regular expression I use if I use it to replace a tag with something thats multiline I get the following:
Numbers: <=numbers=>
becomes
Numbers: number1
number2
When I want something like:
Numbers: Number1
Number2
How can I do this :(