[Implemented] RegExp
[Implemented] RegExp
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
-
- Enthusiast
- Posts: 499
- Joined: Wed Sep 17, 2003 9:17 pm
- Location: Southern California
- Contact:
know a little dos?
it's like using wildcards, patterns and the like, only more flexible aka. more complex
it's like using wildcards, patterns and the like, only more flexible aka. more complex

( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
-
- Enthusiast
- Posts: 499
- Joined: Wed Sep 17, 2003 9:17 pm
- Location: Southern California
- Contact:
http://etext.lib.virginia.edu/helpsheets/regex.htmlPolyVector wrote:could somebody please explain to me what RegExp is?I've heard some talk about it lately and to be honest I'm feelin' a bit out of the loop

Regular Expresions are extremely useful for checking and/or replacing strings. Very quick too.
I don't know if I would call them very quick. They are adequate for working with small strings and parameter lists, but I have found them quite unsatisfactory working with large strings.Kale wrote:http://etext.lib.virginia.edu/helpsheets/regex.htmlPolyVector wrote:could somebody please explain to me what RegExp is?I've heard some talk about it lately and to be honest I'm feelin' a bit out of the loop
![]()
Regular Expresions are extremely useful for checking and/or replacing strings. Very quick too.
Another similar product I have used is "AWK", but still, nothing beats a well written piece of code.
-
- Addict
- Posts: 1126
- Joined: Wed Oct 15, 2003 12:40 am
- Location: Sweden
- Contact:
Regular Expressions are a must for a X-Platform Language (that includes Unix/Linux). Its true that ReExprs are fairly painful to learn - but believe me if you come from the Unix/Linux Scripting world and take RegExpr for granted with SED / AWK / GREP etc. Its a hard painful world without them. Seriously, 10 chars of RegExpr = 100 lines of code in any regular language.
Ok - perhaps a slight exaggeration, but those who use it know what I mean.
Such a shame that PB lacks RE & STDIN
Please Fred STDIN would take you a couple of hours to code
and you could bolt in a *standard* RE Library, I'm sure....
Ok - perhaps a slight exaggeration, but those who use it know what I mean.
Such a shame that PB lacks RE & STDIN

Please Fred STDIN would take you a couple of hours to code

Ta - N
stdin / stdout yes please...
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
Yes, regular expressions please! Also, STDIN/STDOUT please!
The PBRegExpEx lib by FloHimself is a great help. But I had to work for a while to get my head around the syntax and build my own procedures to make its implementation a little easier for me. It reminds me somewhat of PCRE, which I used once in a C++ app. I'm sure part of the reason for the time it took was because I'm new to PureBasic. No global or case-insensitive functionality. But, I'm certainly glad FloHimself has provided it. I'm a regular expression junkie
The PBRegExpEx lib by FloHimself is a great help. But I had to work for a while to get my head around the syntax and build my own procedures to make its implementation a little easier for me. It reminds me somewhat of PCRE, which I used once in a C++ app. I'm sure part of the reason for the time it took was because I'm new to PureBasic. No global or case-insensitive functionality. But, I'm certainly glad FloHimself has provided it. I'm a regular expression junkie

Paul H.
Just wanted to correct my previous statement that with PBRegExpEx there is 'no... case-insensitive functionality'. There is, in fact, control over case sensitivity when searching with the meta characters \u (upper case) and \l (lower case). Guess I hadn't read the Help file carefully enough. <grimace> So, while I prefer Perl's syntax of "/[a-z]+/i" I can get the results I need using PBRegExpEx with "(/u|/l)+". Of course, in this case, I'd have the possible overhead of an unneeded backreference or subexpression.
Anyway, just thought I'd clarify, in case anyone cares...
Paul H.
Anyway, just thought I'd clarify, in case anyone cares...
Paul H.