I'm trying to write regular expression in PHP which simply would **remove alphanumeric words (words which contains digits)**, but not numbers which have [punctuation](https://en.wikipedia.org/wiki/Punctuation) and similar special characters (e.g. prices, phone numbers, etc.).

Words which should be removed:

> 
> `1st`, `H20`, `2nd`, `O2`, `3rd`, `NUMB3RS`, `Rüthen1`, `Wrocław2`
> 
> 
> 

Words which shouldn't be removed:

> 
> `0`, `5.5`, `10`, `$100`, `£65`, `+44`, `(20)`, `123`, `ext:124`, `4.4-BSD`,
> 
> 
> 

Here is the code so far:

```
$text = 'To remove: 1st H20; 2nd O2; 3rd NUMB3RS; To leave: Digits: -2 0 5.5 10, Prices: $100 or £65, Phone: +44 (20) 123 ext:124, 4.4-BSD';
$pattern = '/\b\w*\d\w*\b-?/';
echo $text, preg_replace($pattern, " ", $text);

```

However it removes all words including digits, prices and phone.

I've also tried so far the following patterns:

```
/(\\s+\\w{1,2}(?=\\W+))|(\\s+[a-zA-Z0-9_-]+\\d+)/ # Removes digits, etc.
/[^(\w|\d|\'|\"|\.|\!|\?|;|,|\\|\/|\-|:|\&|@)]+/ # Doesn't work.
/(\\s+\\w{1,2}(?=\\W+))|(\\s+[a-zA-Z0-9_-]+\\d+)/ # Removes too much.
/[^\p{L}\p{N}-]+/u                       # It removes only special characters.
/(^[\D]+\s|\s[\D]+\s|\s[\D]+$|^[\D]+$)+/ # Removes words.
/ ?\b[^ ]*[0-9][^ ]*\b/i                 # Almost, but removes digits, price, phone.
/\s+[\w-]*\d[\w-]*|[\w-]*\d[\w-]*\s*/    # Almost, but removes digits, price, phone.
/\b\w*\d\w*\b-?/                         # Almost, but removes digits, price, phone.
/[A-Za-z0-9]*[A-Za-z][A-Za-z0-9]*/       # Almost, but removes too much.

```

which I've found across SO (most of them are usually too specific) and other sites which suppose to remove words with digits, but they're not.

How I can write a simple regular expression which can remove these words without touching other things?

Sample text:

> 
> To remove: `1st` `H20`; `2nd` `O2`; `3rd` `NUMB3RS`;
> 
> 
> To leave: Digits: -2 0 5.5 10, Prices: $100 or £65, Phone: +44 (20) 123 ext:124, 4.4-BSD
> 
> 
> 

Expected output:

> 
> To remove: ; ; ; To leave: Digits: -2 0 5.5 10, Prices: $100 or £65, Phone: +44 (20) 123 ext:124, 4.4-BSD
> 
> 
>