|
-
Nov 23rd, 2005, 11:32 AM
#1
[RESOLVED] ereg help for lookbehind and lookforward
What is the syntax for lookbehind and lookforward with ereg? I try to match the month part of a date, and it can look like this:
2005-05-30
or
2005/05/30
and I only want the 05 part. I tried something like this:
eregi('(?<=[-/])[[:digit:]][[:digit:]](?=[-/])', $date, $res))
but doesn't look like it liked that way of doing this, but it works perfectly fine in my regex-coach.
- ØØ -
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|