Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- regex , ereg() Problems???
December 16, 2006, 6:53 pm
rate this thread
to create a conditional statement based on whether or not the first two
characters of a variable contain "E9". The variable will always be
either a 6 or a 7 digit, alpha-numeric string begining with "E". I have
tried the following ereg() statement and it picks up everything because
it begins with "E". I cannot seem to find any examples for matching
characters in a specific location within a string except for the
begining or the end. I am sure there is a simple solution. Any ideas??
Re: regex , ereg() Problems???
This would mean: Match if the first character if it's in the block between
, i.e. everything starting with 'E' _or_ '9' will match.
Do not use  if you're looking for an exact string.
Starting with E9:
Case insensitive (either E or e):