Search found 328 matches
- Sun Dec 27, 2020 10:07 am
- Forum: Technical / Scripting
- Topic: Consume a result
- Replies: 11
- Views: 5549
Re: Consume a result
Hi again, Looking at your regex: RegEx>\b(\d\d?);(?!.*\b\1\b),CompareStrings,0,match,nom,1,,Results 0: COMPARESTRINGS=24;36;50;8;24;16;2;5;51; You go through your string left to right and try to find/match two digits and a ; and then look ahead to ensure that there are no duplicates to the right. Wh...
- Sat Dec 26, 2020 7:59 pm
- Forum: Technical / Scripting
- Topic: Consume a result
- Replies: 11
- Views: 5549
Re: Consume a result
If I adjust your script and add the number 2 to Using then...
Code: Select all
let>Using=24:36:2:
let>MyList=50;8;24;16;2;5;51;
Let>CompareStrings=%Using%%MyList%
StringReplace>CompareStrings,:,;,CompareStrings
RegEx>\b(\d\d?);(?!.*\b\1\b),CompareStrings,0,match,nom,1,,Results
MDL>Results
- Sat Dec 26, 2020 7:54 pm
- Forum: Technical / Scripting
- Topic: Consume a result
- Replies: 11
- Views: 5549
Re: Consume a result
Hi again, In your previous example, $Base includes all numbers that do not have a duplicate, as well as all duplicates. So really you want everything except $Base. I think the correct way to refer to a named group in the replacement field would be $<Base> not $Base, so I think $Base is wrong syntax ...
- Sat Dec 26, 2020 10:06 am
- Forum: Technical / Scripting
- Topic: Consume a result
- Replies: 11
- Views: 5549
Re: Consume a result
Hi again, Great that it works and all the best for 2021! The story could have ended here if it wasn't for curious-me. Looking at your final pattern I see you first match/find all numbers that do not have a duplicate, as well as all extra duplicates (smart!). Then you replace the result with $Base gi...
- Fri Dec 25, 2020 3:44 pm
- Forum: Technical / Scripting
- Topic: Consume a result
- Replies: 11
- Views: 5549
Re: Consume a result
Hi! Nice to see someone interested in Regex - your best friend and your worst enemy. If I understand it correctly you just want to remove duplicates. You can do this by simply taking the matched numbers and replace them with nothing, ie leave the replacement string empty. Your example without the na...
- Sat Dec 19, 2020 5:29 pm
- Forum: Technical / Scripting
- Topic: Get list of files
- Replies: 2
- Views: 1658
Re: Get list of files
Hello, If you use ; as delimiter then maybe sth like this:
i.e. look for non-delimit characters [^;]+ that end w . and three digits.
Code: Select all
GetFileList>C:\Users\Christer\Desktop\*.*,strFileList,;
Let>tmp0=[^;]+\.\d\d\d
RegEx>tmp0,strFileList,0,m,nm,0
- Sun Jun 07, 2020 5:46 pm
- Forum: Technical / Scripting
- Topic: UTF-8 edit ini file
- Replies: 11
- Views: 6408
Re: UTF-8 edit ini file
Good you have a working solution. Not sure if relevant/helps, I played around and note that if I create and save an empty inifile2.ini in Notepad (as UTF-8), then when running your script in MS it looks ok (shows åäö).
- Sat Jun 06, 2020 8:31 pm
- Forum: Beginners
- Topic: Extracting links with numeric value in file name
- Replies: 1
- Views: 4109
Re: Extracting links with numeric value in file name
Hi, There are different ways to solve it. If there is one link per row then one way could be (required code very short, but added explanation in case you have not worked with RegEx> before): LabelToVar>strInfo,strLinks // Use RegEx> to match strings: // https:// // followed by zero or more character...
- Sat May 30, 2020 8:58 am
- Forum: Beginners
- Topic: Error [HTTP / 1.1 404 Not Found] in chromedriver
- Replies: 10
- Views: 10005
Re: Error [HTTP / 1.1 404 Not Found] in chromedriver
I suddenly got the same problem today. Following the suggestion, I started ChromeDriver manually (as Administrator), ran the script and it started to work again. Not sure if relevant or not, before running the script I also commented out //Let>CHROMEDRIVER_EXE=c:\chromedriver.exe got a warning, but ...
- Fri Jan 24, 2020 1:27 pm
- Forum: Technical / Scripting
- Topic: Remove blank lines when there are more than one of them
- Replies: 10
- Views: 6513
Re: Remove blank lines when there are more than one of them
Sometimes I get differences using MS and RegexBuddy, but usually it relates to difference in modifier settings. Top left in RegexBuddy you have different choices for eg, case sensitivity, spacing, dot matches line breaks, etc. In MS, if unsure, it can help to include the modifier in the search patte...
- Fri Jan 24, 2020 12:52 pm
- Forum: Technical / Scripting
- Topic: Remove blank lines when there are more than one of them
- Replies: 10
- Views: 6513
Re: Remove blank lines when there are more than one of them
From the the Manual:
RegEx is compatible with the Perl 5.10 regular expression syntax using the PCRE library.
- Wed Jan 22, 2020 8:40 pm
- Forum: Beginners
- Topic: Cosine function
- Replies: 2
- Views: 2721
Re: Cosine function
Hi, According to the manual, the COS function requires the angle to be entered in radians, not degrees, see conversion below:
Code: Select all
Let>val_in_degrees=340
Let>val_in_radians={%val_in_degrees%/360*2*Pi}
Let>result={cos(%val_in_radians%)}
MDL>result
- Wed Jan 22, 2020 9:48 am
- Forum: Technical / Scripting
- Topic: Remove blank lines when there are more than one of them
- Replies: 10
- Views: 6513
Re: Remove blank lines when there are more than one of them
Hi, just an example how to solve it using Regex> You treat the text as one line and look for two or more consecutive end-of-line-characters (\R in regex language). If found replace with just two of them - %CRLF%. LabelToVar>Text,strText Let>tmp0=(?s)(\R){2,} RegEx>tmp0,strText,0,m,nm,1,%CRLF%%CRLF%,...
- Wed Jan 08, 2020 12:09 pm
- Forum: Technical / Scripting
- Topic: Read checkbox from ini
- Replies: 1
- Views: 1600
Re: Read checkbox from ini
Hi, Not sure of the State property right now but if you just use SetDialogProperty> to set the Checked property to True/False, and then show the Dialog, it should work. Dialog>Dialog1 object Dialog1: TForm Left = 361 Top = 284 HelpContext = 5000 BorderIcons = [biSystemMenu] ClientHeight = 203 Client...
- Sun Nov 24, 2019 7:32 pm
- Forum: Technical / Scripting
- Topic: RegEx Help
- Replies: 4
- Views: 3070
Re: RegEx Help
Hello, I have read that MS uses a version (not the latest) of Perl but am not sure about the details. To get blocks incl tokens you can eg use: (?s)/\*.+?\*/ To get blocks w/o tokens you can eg use: /\*\R\K(?s).+?(?=\R\*/) where (?s) turns on single line mode \R matches end of lines \K discards what...