I tried the print_r on $res. The preg_match does the first set fine.
So I get:
Campus
Bob (Williams)
the second one starts
-
Address123 Main St
-
CityOxford
and so on
[EMAIL PROTECTED] wrote:
preg_match('#([^|]*)[|]+([^|]*)~[\\]+(([^\\]*)~[\\]+)+#Ui', $string, $res
I knew I shouldnt have abreviated the string.
here is the string sorry I kinda flubbed on the last string
"LocationCampus~\\n-\nNameBob
Williams~\\n-\nAddress123 Main St~\\n-\n..."
the ... is a very long list.
how does this change the
Not sure what you want exactly, but here's a way using regexps to
retrieve the strings seperatly:
$string = 'CampusBob (Williams)~\toms more
crap)~\blah blah blah)~\';
preg_match('#([^|]*)[|]+([^|]*)~[\]+([^\]*)~[\]+([^\]*)~[\]+#Ui',
$string, $res);
$campus = $re
Dan McCullough wrote:
Hey everyone
Having a bit of trouble with something.
I have a string which has known patterns.
$string"CampusBob (Williams)~\toms more crap)~\blah blah blah)~\";
What I am looking for is
Location which is Campus
"Yz James" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hey John,
> something like this might work:
>
>
> $string = "This is a string with an embedded image [bird.gif,this is a
> bird]";
>
> $string = preg_replace("/\[(.*?\.)(gif|jpg),(.*?)\]/i", " alt=\"\\3
Hey John,
something like this might work:
", $string);
echo $string;
?>
James
"John A. Grant" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm reading some HTML text from a file and echoing it to
> stdout. The HTML text contains but I would rather
> hav
6 matches
Mail list logo