in reply to strip text from a string

Welcome to the monastery, KalaMonkey. I assume this is a homework assignment. While we are happy to help with homework, it is considered good form to identify it as such, and even better to show us how your code has failed you in previous attempts. See How do I post a question effectively?.

In this case, you should read Using character classes in perlretut. In particular, you are interested in the set of all characters that are not apostrophes. This is usually expressed as [^']. You will also need to use Quantifiers to specify a character count: in this case *, which gives you zero or more occurrences.


#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

Replies are listed 'Best First'.
Re^2: strip text from a string
by KalaMonkey (Initiate) on Sep 11, 2014 at 15:20 UTC
    Hi,

    This isn't a homework assignment, I'm trying to strip out column values in various SQL statements, that have been outputted to a log file. The example given was a trivial example to simplify the request, I have a perl script that pulls the statements into a .csv file, so that I can then group the statements together and write indexes based on the SQL.

    The SQL is produced from code, so will always call the same columns in the same order so as long as I strip out the data held in the columns I can work out what indexes are needed.

    I only started to use perl on Monday, I'll have a look at the perldocs. It's a case of on the job learning.

    Thanks
        Hi,

        Thanks for the list of resources, usually I have more time to learn new skills, unfortunately for me the need to use perl came late in the day and the deadline is today.

        I will use the list provided for future reference, there's no point letting it go to waste.

        Thanks

      In addition to kennethk's list of resources I strongly recommend getting a copy of the Perl Pocket Reference.*

      * It must be good, this is the second time I've made the recommendation in as many days (and I'm not the author or on commission).

      Perl is the programming world's equivalent of English