Page 1 of 1
Request - RegEx 101
Posted: 01 Aug 2015 01:59
by SkyFrontier
Hi, people.
I considered writing a guide for beginners (15 days I'm regex-ing a bit more freely, SEEING the pattern-composition) as I believe that teaching is also a way for learning. But I won't be confident enough as regex has an extra complexity, and it is: you'd may achieve what you want, but it won't be necessarily the best or even the safest way. Not to mention the total lack of real case usages worth mentioning...
Something in the fashion I started in
an old project on scripting, assuming the user has zero knowledge on the matter, plenty of examples and progressive, accumulative in complexity when it comes to pattern building.
I ask this because over time I have been researching on reference materials and yet their variety is unquestionable, their newbie-friendliness is arguably awful. Then there are flavors. [facepalm]
If i were a
highend 
user trying to leave a
mark-o-the-forum

, I undoubtedly would take a chance on this waiting for a
Don Quijote

to make it sticky as high as the frontiers of sky.
RegEx is definitely not for beginners. Something should be made about it: its power is astonishing.
Re: Request - RegEx 101
Posted: 01 Aug 2015 12:08
by Stef123
Nice timing. Incidentally I've been sorting out my RegEx confusion all morning, so my brain is warmed up and eager to participate.
SkyFrontier wrote:If i were a
highend 
user trying to leave a
mark-o-the-forum

, I undoubtedly would take a chance on this waiting for a
Don Quijote

to make it sticky as high as the frontiers of sky.

Re: Request - RegEx 101
Posted: 01 Aug 2015 15:18
by bdeshi
well, RegExp is the new hot topic of XY beta club! Maybe something nice will come out of it...

Re: Request - RegEx 101
Posted: 01 Aug 2015 15:34
by Marco
SkyFrontier wrote:If i were a
highend 
user trying to leave a
mark-o-the-forum

, I undoubtedly would take a chance on this waiting for a
Don Quijote

to make it sticky as high as the frontiers of sky.
I don't have the truth in my pockets. What can I say... The syntax is not too difficult, and you can find it pretty much anywhere on the web. But proper usage is another matter, and writing truly optimized regexes requires knowing how a regex engine works.Almost programmer skills - and I'm not a programmer

Re: Request - RegEx 101
Posted: 02 Aug 2015 16:13
by Stef123
SammaySarkar wrote:well, RegExp is the new hot topic of XY beta club! Maybe something nice will come out of it...

Hot it may be, but not sexy or alluring. More the kind of hot as in caution-attention warnings, handle with utmost care, expect to get your fingers burned.
Anyway, to get the ball rolling, here my private wiki-notes, complemented with highend's contributions that got me kick-started. Then I quickly realized that this is far more complicated as it pretended to be at the outset. Especially the greedy vs lazy stuff.
RegEx_Syntax.zip
Important note: My RegEx focus is not on XY exclusively. I intend to use it in AHK and FileLocatorPro and ConnectedText and text editors and ..... It's these various sources from which I dumped RegEx help into my private wiki. The attached compilation is my attempt to consolidate all findings into a coherent look-up reference, hoping that I'll finally be able to exercise more control over it.
Re: Request - RegEx 101
Posted: 03 Aug 2015 08:41
by SkyFrontier
Hey!

That's a complete start, Stef! What about making it open for public edition, wiki or something?
I don't know other platforms hands on, but have seen some mentioned here, I guess.
>>
Visitors interested in learning regex, you should REALLY take a look at the (download link:) attached file in Setf123's previous post!
(I should've made my own version of that pic when I was younger... not that I'm much different now, but the mood is everything.)
Re: Request - RegEx 101
Posted: 03 Aug 2015 09:48
by Stef123
Thank you Sky,
very flattering
No objections to making this public. Open to anyone to grab whatever he finds useful. My only concern are copyright infringements - it's compiled from various sources, orginally intended for my private info only. Didn't bother to footnote the rightful sources. This might become a problem.
It's a snapshot of an ongoing process, bound to change as I learn. In fact, I already re-shuffled the order of headings - and updated the post above. I use Writing as a Thinking Tool, editing and re-structuring helps me to crystalize thoughts and put them in a logical order, I gather - clarify - reflect - condense - revise ..... an endless loop.
Many things probably don't make sense (not even to myself at the current state of affairs). It's just an exported topic from my overall help project, taken out of context. I removed some broken links, left out files - the upload package exceeded the forum limit.
Re: Request - RegEx 101
Posted: 07 Aug 2015 10:21
by Garonne
For anyone who needs a professional approach to RegExes:
I'm regularly using RegexBuddy and RegexMagic from JGsoft.
Both are very useful tools to help you learn RegEx (RegexBuddy) or to get a fast result (RegexMagic).
Both cost 30 € each, but you get a discount for RegexMagic if you already own RegexBuddy (reducing the price to 20 €).
It's especially helpful that both tools offer the option to select the RegEx engine to generate code for... which is especially useful if you need to deal with a RegEx engine you haven't worked with yet and that might have different codes than the ones you usually know (like having to use an old VB RegEx engine *cough*).
EDIT: Will take a look at Stef's file. It's probably a useful (and cheaper) approach but... Just wanted to tell you about those...
Re: Request - RegEx 101
Posted: 07 Aug 2015 11:40
by Stef123
Garonne,
my help topic contains resources I found useful, online tools, freeware, and originally I had also included RegExBuddy and -Magic. Then I decided to delete those links pointing to JGsoft because I could not upload their files anyway (copyright and forum attachment size limit)
However, my notes still contain passages that I drew from JGsoft help files, which I find excellent. Much more advanced than the usual intro stuff, which never covers enough mileage to actually reach real-life destinations. All too soon I always realize I must be missing something - and that's how this whole help topic came to life, birthed by midwives from various forums who gave me directions that I simply compiled and complemented.
Garonne wrote:
... both tools offer the option to select the RegEx engine to generate code for... which is especially useful if you need to deal with a RegEx engine you haven't worked with yet and that might have different codes than the ones you usually know (like having to use an old VB RegEx engine *cough*).
What's the "coughing" all about?
Possibly the answer to my question over there (and also the explanation for this whole thread?):
http://www.xyplorer.com/xyfc/viewtopic. ... 42#p126945
Re: Request - RegEx 101
Posted: 07 Aug 2015 12:03
by Garonne
Yeah,
as I mentioned, I hadn't had the time to take a look into your files yet, those two tools were just the first thing that came to my mind when I read the posts.
Stef123 wrote:
Garonne wrote:
[...] (like having to use an old VB RegEx engine *cough*).
What's the "coughing" all about?
XY is using an old VB Engine... We've already tried to convince Don to upgrade to something newer without success yet (mostly because of time restraints, if I remember correctly... and low priority...).
Re: Request - RegEx 101
Posted: 07 Aug 2015 14:18
by Stef123
Thanks for filling me in, Garonne,
just had my deja vue - must have asked this before, or at least read about it here in the forum - so Visual Basic 6 is the way to go on the output destination dropdown, right?
Re: Request - RegEx 101
Posted: 07 Aug 2015 14:22
by highend
Visual Basic 6 is the way to go on the output destination dropdown
It's a valid choice (and it shows you what XY doesn't support)
Re: Request - RegEx 101
Posted: 07 Aug 2015 14:34
by Stef123
highend wrote:Visual Basic 6 is the way to go on the output destination dropdown
It's a valid choice (and it shows you what XY doesn't support)
Thanks. It's these little details that spell success or frustration when things just don't seem to work out.