Question: I'm trying to strip the span tags w/ a letter-spacing that starts with 0. or 1.

```
'<span style="letter-spacing:0.50 px">Boulevard,</span> '
to equal
'Boulevard, '

```

Thank you

Here's an example of a complete line.

```
<span style="letter-spacing:1.33 px">PRODUCTS</span> <span style="letter-spacing:1.37 px">MODEL</span> <span style="letter-spacing:0.77 px">HPI-27C</span> <span style="letter-spacing:1.39 px">MODDED)</span> ; <span style="letter-spacing:1.12 px">(HIGHWAY</span> <span style="letter-spacing:1.33 px">PRODUCTS</span> <span style="letter-spacing:1.37 px">MODEL</span>

```

Needs to end up like

PRODUCTS MODEL HPI-27C MODDED) ; (HIGHWAY PRODUCTS MODEL

Answer: 
Perl oneliners:

1.) using the [Mojo::DOM58](https://metacpan.org/pod/Mojo::DOM58) module

```
perl -0777 -MMojo::DOM58 -E '$d=Mojo::DOM58->new(<>);$d->find("span")->grep(qr/letter-spacing:[01]/)->map(sub{$_->strip});print "$d"' <file.html

```

2.) Or if you have [Mojolicious](https://metacpan.org/release/Mojolicious) installed, you can use the [ojo](https://metacpan.org/pod/ojo) module as:

```
perl -Mojo -E '$d=x(f("file.html")->slurp);$d->find("span")->grep(qr/letter-spacing:[01]/)->map(sub{$_->strip});print "$d"'

```

both examples prints:

```
PRODUCTS MODEL HPI-27C MODDED) ; (HIGHWAY PRODUCTS MODEL

```
Not exactly robust but does what you asked for given that 1 sample line you posted:

```
$ sed -E 's#<span[^>]+letter-spacing:[01][^>]+>(.*)</span>#\1#' file
'Boulevard, '

```

The above will work in any sed that supports `-E` for EREs, e.g. GNU sed and OSX sed.

Given your updated sample input/output, this will do what you want with GNU awk for multi-char RS and RT:

```
$ awk -v RS='</span>' '{ORS=( sub(/<span[^>]+letter-spacing:[01][^>]+>/,"") ? "" : RT)}1' file
PRODUCTS MODEL HPI-27C MODDED) ; (HIGHWAY PRODUCTS MODEL

```