3 ms·
How are regular expressions "random" and "application-specific"? Admittedly I do not have a source for this, but I'd assume that a large percentage of programs
by x3ro 12y ago
How are regular expressions "random" and "application-specific"? Admittedly I do not have a source for this, but I'd assume that a large percentage of programs employs Regexes somewhere. Every major language has Regex support, often built-in [1].
Swift, among other things, aims to make things less verbose right?
[1]: http://en.wikipedia.org/wiki/Comparison_of_regular_expression_engines http://en.wikipedia.org/wiki/Comparison_of_regular_expressio...
- wyager 12y ago> Every major language has Regex support, often built-in That's a very bold statement. My most commonly used languages (Haskell, Rust, Go, C, and C++) do not have regex support built in. I don't think any of them even have regex support in their standard library. >I'd assume that a large percentage of programs employs Regexes somewhere I think that would be incorrect. I've never used a regex in a production program. In fact, the only time I ever use regexes is when I'm scraping data or doing searches, and that certainly doesn't account for "a large percentage of programs". A large percentage of programs also use URL fetching, but that's not a good reason to make URL fetching part of the core language.
- plorkyeran 12y agoRust, Go and C++ all have regex libraries as part of the standard library.
- wyager 12y agoOK, cool. It's still not built in to the language in any meaningful way. There isn't any special syntax or rule-bending done for regexes.