in reply to Removing certain non-word characters

for the first:
s/[^a-zA-Z0-9'\x20]//g;
With the second, please give an example. I suspect you're running into problems with the match being greedy.

Replies are listed 'Best First'.
Re: Re: Removing certain non-word characters
by Anonymous Monk on Apr 26, 2004 at 06:20 UTC
    I'm collecting meta tag information. I want to get the keywords section out, but just the keywords..not the meta tags itself.
    <meta name="keywords" content="one,two,three,four">
    And I want to match anything inside of content="" but nothing else. I tried your s/// but that doesn't work, it made the regex a little worse actually. If I can get it to get the information I want, then the rest of the problems should go away. Thanks.