Consider the below given is a string
PO BOX number 1234,
CA - 3265
TEL: +1-200-200-2000 FAX: +1-200-200-2001
PO BOX number 1234,
CA - 3265 Service: +1-200-200-2002 \ +1-200-200-2022 F : +1-200-200-2003
PO BOX number 1234,
CA - 3265 care: +1-200-200-2004 f : +1-200-200-2005
PO BOX number 1234,
CA - 3265 fire: +1-200-200-2006 fax : +1-200-200-2007
PO BOX number 1234,
CA - 3265 help: +1-200-200-2008 fax - +1-200-200-2009
PO BOX number 1234,
CA - 3265 fax : (+123)-4567890 \ (+123)-4567891
The regular expression mentioned below is the one I'm using for finding a fax number in different representation
(?:(f|F)((a|A)(X|x))?(?:\s?(\-|\:)?\s?))(?:\s?[0-9\+\.\(\)\/\\\-]\/?\\?\s?){7,30}
Ex: The above regex would match all the Fax from the given string as shown below
FAX: +1-200-200-2001
F : +1-200-200-2003
f : +1-200-200-2005
fax : +1-200-200-2007
fax - +1-200-200-2009
fax : (+123)-4567890 \ (+123)-4567891
Note: I am considering the phone numbers as rest of the numbers available in the given text apart from taking the FAX.
Ex:
TEL: +1-200-200-2000
Service: +1-200-200-2002 \ +1-200-200-2022
care: +1-200-200-2004
fire: +1-200-200-2006
help: +1-200-200-2008
So I need the phone numbers whose text not starts with [faxFAX]. I have tried with [^faxFAX]
just changing the above specified regular expression but I couldn't get the desired result.please help me out to write a regular expression for this.