Teck wrote:
Hi,
I'm trying to find a way to get part of a string where the part is
matched with regular expressions.
So, for example, if I have a string:
a2b3cd5ef6ghi7232jklmn
I need to grab "12b3cd5" using regular expressions and store the part in
a variable.
$var = do_something("",""
Jochem Maas :
mathieu leddet schreef:
Thanks a lot Max (and Jochem), you solved my issue.
PS - you solved the issue but did you learn what a [negative] look
behind assertion is?
Mathieu, I agree with Jochem.
If you periodicaly solve issues, such this - you must know about behind
assertions
Jochem Maas writes:
attend? don't understand what you mean BUT you have given the OP the
answer by changing his regexp to include a [negative] look behind assertion
for the backslash. :-)
I hope, my regular expression answer the purpose, than need Mathieu
(what mean abbreviation OP? can send
mathieu leddet writes:
Hi everyone,
I am struggling with regular expression trying to match strings
delimited by double quotes, but taking into consideration that \" is not
a string ending character.
..
// pattern for catching strings between "
$pattern = '#"([^"]*)"#';
.
$out conta
4 matches
Mail list logo