A bit of regex help needed
Re: A bit of regex help needed
I'm not sure if I understand...
When you want to capture more / less path elements, just + / - the number in {}
Regarding not capturing the last \
{ } -1 and repeat the capture group once
or just use trim($a, '\', "R");
When you want to capture more / less path elements, just + / - the number in {}
Regarding not capturing the last \
{ } -1 and repeat the capture group once
or just use trim($a, '\', "R");
One of my scripts helped you out? Please donate via Paypal
Re: A bit of regex help needed
The point is I'm having the need of specific regexes for each case described as they are all present on single documents, so a one-for-all token-wise solution won't do.
Thank you for helping, highend.
Thank you for helping, highend.
Power-hungry user!!!
Re: A bit of regex help needed
I suspect some of my difficulties with XY regex seem to arise from unsupported expressions.
Is there any official documentation for the regex engine XY uses? Haven't found a link in the "major" threads this forum's search returns.
Thanks, FH
Is there any official documentation for the regex engine XY uses? Haven't found a link in the "major" threads this forum's search returns.
Thanks, FH
Re: A bit of regex help needed
Not official but: http://www.regular-expressions.info/vbscript.html
One of my scripts helped you out? Please donate via Paypal
-
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: A bit of regex help needed
Hello, people!
How do I process this
...reducing it to:
The Butterfly Effect (2004); Alice's Adventures in Wonderland (1972)
TIA!
How do I process this
Code: Select all
Image of The Butterfly Effect
29.
The Butterfly Effect (2004)
7.7/10
Evan Treborn suffers blackouts during significant events of his life. As he grows up, he finds a way to remember these lost memories and a supernatural way to alter his life by reading his journal. (113 mins.)
Director: Eric Bress, J. Mackye Gruber
Stars: Ashton Kutcher, Amy Smart, Melora Walters, Elden Henson
Add to Watchlist
Image of Alice's Adventures in Wonderland
30.
Alice's Adventures in Wonderland (1972)
5.8/10
Alice (Fiona Fullerton) falls down a rabbit hole and into a magical dream world populated by surreal characters and bewildering adventures... (101 mins.)
Director: William Sterling
Stars: Fiona Fullerton, Michael Jayston, Hywel Bennett, Michael Crawford
Add to Watchlist
The Butterfly Effect (2004); Alice's Adventures in Wonderland (1972)
TIA!
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Re: A bit of regex help needed
Code: Select all
$str = <<<#YOURSTRINGHERE
#YOURSTRINGHERE;
$filter1 = regexmatches($str, "\d+\.\r?\n.*?\r?\n", "<crlf>");
$filter2 = regexreplace($filter1, "^\d+\.$(?:\r?\n)+(.*?)(?:\r?\n)+", "$1;");
text $filter2;
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: A bit of regex help needed
...never my struggle would get me there, thanks much!
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Re: A bit of regex help needed
No problem.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: A bit of regex help needed
Is it possible for regex to capture and list all the variables present (clipboard) in a script?
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Re: A bit of regex help needed
Code: Select all
text regexmatches(<clipboard>, "\$[a-z](\w+)?\b", <crlf>);
One of my scripts helped you out? Please donate via Paypal
-
- Posts: 2341
- Joined: 04 Jan 2010 14:27
- Location: Pasárgada (eu vou!)
Re: A bit of regex help needed
Perfection!
Thanks, highend!
Thanks, highend!
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...
Re: A bit of regex help needed
I'll put in my two cents if you'll give a complete set of test data and your desired match results.
If you provide a test data sample that, when matched, covers your problem (and doesn't cover close exceptions) - we're done. Make sure to include any context that might help or hinder a correct match.
I'd rather not assemble my own definitive test data out of a series of posts, the same with your grouping requirements or whatever, but I don't mind working on it. Ofc, highend will beat me to it and likely do a better job, but still
One post, all required information and definitive (but not overly redundant) test data: This will be good for you to rigorously determine yourself anyway, regardless of help.
Clarity is good.
Hope I can help - or someone beats me to it.
If you provide a test data sample that, when matched, covers your problem (and doesn't cover close exceptions) - we're done. Make sure to include any context that might help or hinder a correct match.
I'd rather not assemble my own definitive test data out of a series of posts, the same with your grouping requirements or whatever, but I don't mind working on it. Ofc, highend will beat me to it and likely do a better job, but still
One post, all required information and definitive (but not overly redundant) test data: This will be good for you to rigorously determine yourself anyway, regardless of help.
Clarity is good.
Hope I can help - or someone beats me to it.