Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
Thread: Regular expression fetch attempt
03-01-2010, 11:14 PM #1
- Join Date
- Jul 2002
- Thanked 0 Times in 0 Posts
Regular expression fetch attempt
I am trying to fetch anything before the AAAA in this example:
James B.AAAAOther I would need to get James B.
The firstname part is coming from a variable and will be different everytime but need to just fetch anything before the AAAA part:
MikeAAAACar I would need to get Mike
Nancy (Deb)AAAABus I Would need to get Nancy (Deb)
My attempt almost works but need help on my regular expression because it doesnt work if there is a non letter before AAAA such as Ed O.AAAAOther or Carrie (Kat)AAAAOther
03-02-2010, 07:06 AM #2
which matches anything...
03-02-2010, 07:29 AM #3
to be more specific..
$x =~ /^(.*)(AAAA);