18 Answers
New AnswerThe first RegExs were used in the 1950s, C came along in 1970. So I am just curious why the early designs of the C language excluded them. Surely they come in handy for searching files and other areas?
3/30/2018 10:23:31 PM
Ace18 Answers
New AnswerBecause Unix had various tools you ran from your C program so support wasn't needed within the language.
Pure guess: C was made as small as possible (why it's so modular). I don't think design choice so much as lack thereof. One thing I like about C has been lack of feature creep (compared to C++ and others). The design principle was probably KISS. I mean there's no built-in string but implementing one is simple. So, yeah, my money's on simply wasn't necessary nor was it a serious "game-changer" in terms of use case. Sidenote: Holy schit, regex is older than my mother!
For a moment I was going to say that C had <regex.h>, but I realized that it is part of the POSIX regular expression library looking on internet 😅
John Wells and the others make great points. I'd also add that text processing wasn't as essential before the internet! Text processing and text-based data has taken off exponentially. PHP is a web-based language so regular expressions are part of the language.
[meta] Here are some short bios in regex history (e.g., Henry Spencer, the first to release a regex library for importing (1986), Ken Thompson for including it in "ed", ...etc) http://blog.stevenlevithan.com/archives/regex-legends
Read about Bell Labs... for insight into B to C languages https://www.bell-labs.com/usr/dmr/www/bintro.html
BB_CODER_Girl I sorry you are confused. However, spamming this question is NOT the answer. Please delete your post. I'll tag you where we can talk.
Sadaam Omer Ali you have literally copied verbatim the answer _originally_ posted by John Wells . Berne Convention says that's copyright infringement, I say it's just being a doos. I'm not going to report you this time, but I suggest you don't do it again. Maybe say sorry, too.
I suppose John Wells is wrong. C was created to replace asm in development of operation systems and other. So, it is very powerfull , but it is not even high level language. RegExp's are more suitable for script coding, not for system.
at that time c was newbie... a few professors were programmer of C "see"...similar to a Chinese space station... fall back to earth ... & nowadays black hole...story
Because Unix had various tools you ran from your c program so support wasn’t needed within the language. Bye
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message