Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

I see your rant and I raise you a Tom Christiansen contributionTom Christiansen contribution. :-}

I'll take a little license and interpret your question to mean, "Please name some examples where regexes are natural and appropriate."

Small jobs, and in particular one-off jobs, are underappreciated, it seems to me. Suppose that you have one file to parse (maybe you are screen scraping, or maybe you have a data dump from last year and you need to extract the sixth column if it does not start with "%" or "#"). I use a lot of regexes for that.

Another example of small jobs are URL changers, such as in the config file format for Apache (one of many examples here), or Django's urls.py.

I see your rant and I raise you a Tom Christiansen contribution. :-}

I'll take a little license and interpret your question to mean, "Please name some examples where regexes are natural and appropriate."

Small jobs, and in particular one-off jobs, are underappreciated, it seems to me. Suppose that you have one file to parse (maybe you are screen scraping, or maybe you have a data dump from last year and you need to extract the sixth column if it does not start with "%" or "#"). I use a lot of regexes for that.

Another example of small jobs are URL changers, such as in the config file format for Apache (one of many examples here), or Django's urls.py.

I see your rant and I raise you a Tom Christiansen contribution. :-}

I'll take a little license and interpret your question to mean, "Please name some examples where regexes are natural and appropriate."

Small jobs, and in particular one-off jobs, are underappreciated, it seems to me. Suppose that you have one file to parse (maybe you are screen scraping, or maybe you have a data dump from last year and you need to extract the sixth column if it does not start with "%" or "#"). I use a lot of regexes for that.

Another example of small jobs are URL changers, such as in the config file format for Apache (one of many examples here), or Django's urls.py.

Source Link

I see your rant and I raise you a Tom Christiansen contribution. :-}

I'll take a little license and interpret your question to mean, "Please name some examples where regexes are natural and appropriate."

Small jobs, and in particular one-off jobs, are underappreciated, it seems to me. Suppose that you have one file to parse (maybe you are screen scraping, or maybe you have a data dump from last year and you need to extract the sixth column if it does not start with "%" or "#"). I use a lot of regexes for that.

Another example of small jobs are URL changers, such as in the config file format for Apache (one of many examples here), or Django's urls.py.