Search found 265 matches
- 29 Jan 2019, 14:38
- Forum: Ask for Help (v1)
- Topic: RegEx to trim floating decimal places Topic is solved
- Replies: 34
- Views: 6432
Re: RegEx to trim floating decimal places Topic is solved
IMEime's solution fails for all numbers that don't have at least four 0s at the end. For example, 123.456700 fails, it will not match the pattern and will stay as it is, when it should really become 123.4567 . Strangely enough, IMEime's solution returns 123.456700 for 123.4567000000 (while no criti...
- 29 Jan 2019, 14:15
- Forum: Ask for Help (v1)
- Topic: RegEx to trim floating decimal places Topic is solved
- Replies: 34
- Views: 6432
Re: RegEx to trim floating decimal places Topic is solved
Looks like the first script from jeeswg also failed with 0.000000814. It returns 0.00814. So the winner is IMEime whose script is so far standing tall.
- 29 Jan 2019, 14:04
- Forum: Ask for Help (v1)
- Topic: RegEx to trim floating decimal places Topic is solved
- Replies: 34
- Views: 6432
- 29 Jan 2019, 13:39
- Forum: Ask for Help (v1)
- Topic: RegEx to trim floating decimal places Topic is solved
- Replies: 34
- Views: 6432
Re: RegEx to trim floating decimal places Topic is solved
Both jeeswg and IMEime solutions seem to return solid results!
- 29 Jan 2019, 13:27
- Forum: Ask for Help (v1)
- Topic: RegEx to trim floating decimal places Topic is solved
- Replies: 34
- Views: 6432
Re: RegEx to trim floating decimal places Topic is solved
I think I found the first dangerous bug:SALZKARTOFFEEEL wrote: ↑29 Jan 2019, 12:58Not wanting to brag or anything, but my solution is the most fail-safe and perhaps the cleanest so far
3453/4242443=0.000814 (8.13917829891881E-04)
But when the RegEx code is run, it returns: 0.00814 (one zero is missing)
- 29 Jan 2019, 13:05
- Forum: Ask for Help (v1)
- Topic: RegEx to trim floating decimal places Topic is solved
- Replies: 34
- Views: 6432
Re: RegEx to trim floating decimal places Topic is solved
Thanks, jeeswg , SALZKARTOFFEEEL and IMEime! These are great RegEx solutions that I'll be running and testing them.
- 29 Jan 2019, 12:12
- Forum: Ask for Help (v1)
- Topic: RegEx to trim floating decimal places Topic is solved
- Replies: 34
- Views: 6432
RegEx to trim floating decimal places Topic is solved
Looking for a RegEx so that I can trim any number with 6 decimal places so that I can trim the leading floating zeros only after the decimal point but leave 2 zeros after the decimal point if all digits after the decimal point are zeros and 1 zero after the first non-zero digit following the decimal...
- 29 Jan 2019, 11:58
- Forum: Scripts and Functions (v1)
- Topic: ZTrim() : Remove redundant leading/trailing zeroes from a number
- Replies: 24
- Views: 8945
Re: ZTrim() : Remove redundant leading/trailing zeroes from a number
How can this be modified so that I can trim the leading floating zeros only after the decimal point but leave 2 zeros after the decimal point if all digits after the decimal point are zeros and 1 zero after the first non-zero digit following the decimal point if the remaining digits are also zeros? ...
- 28 Jan 2019, 18:01
- Forum: Ask for Help (v1)
- Topic: How to wait until web page is fully loaded on Chrome
- Replies: 3
- Views: 4030
Re: How to wait until web page is fully loaded on Chrome
By image I meant the constant image of a clockwise circle reload button with an arrow that is specific to Google toolbar and is situated to the left of Home button and to the right of Go Forward ->. Firefox has a similar button but is called Refresh. You need to capture that button image and save it...
- 28 Jan 2019, 15:46
- Forum: Ask for Help (v1)
- Topic: How to wait until web page is fully loaded on Chrome
- Replies: 3
- Views: 4030
Re: How to wait until web page is fully loaded on Chrome
Pseudocode #include FindClick.ahk ... GoSub, RE ; RE stands for Refresh/Reload. Here, it waits until the page is fully loaded and "Reload this page" is confirmed Sleep, 1000 ... RE: ;WinWaitActive,ahk_class MozillaWindowClass Loop { MyImage := "refresh.png" ; your saved chrome's "Reload this page" p...
- 28 Jan 2019, 05:10
- Forum: Ask for Help (v1)
- Topic: RegEx - Extracting the text block in the middle Topic is solved
- Replies: 10
- Views: 1499
Re: RegEx - Extracting the text block in the middle Topic is solved
Thanks, SOTE. When it rains, it pours!
Your method does not leave a blank line at the top and obviates the need to remove it.
Your method does not leave a blank line at the top and obviates the need to remove it.
- 28 Jan 2019, 04:15
- Forum: Ask for Help (v1)
- Topic: RegEx - Extracting the text block in the middle Topic is solved
- Replies: 10
- Views: 1499
Re: RegEx - Extracting the text block in the middle Topic is solved
LOL. I'm in Mountain View, CA, and it has been sunny and warm for the last several days.
- 28 Jan 2019, 04:06
- Forum: Ask for Help (v1)
- Topic: RegEx - Extracting the text block in the middle Topic is solved
- Replies: 10
- Views: 1499
Re: RegEx - Extracting the text block in the middle Topic is solved
Awesome! My only question is that when I replace s with clip it seems that it doesn't work:
FileRead, s, Clip.txt ; Works great!
FileRead, Clip, Clip.txt ; Doesn't seem to work
FileRead, s, Clip.txt ; Works great!
FileRead, Clip, Clip.txt ; Doesn't seem to work
Code: Select all
MsgBox % RegExReplace(Clip, "Clip).*Total(.*?)Currency.*", "$1") ; No go?
- 28 Jan 2019, 03:23
- Forum: Ask for Help (v1)
- Topic: RegEx - Extracting the text block in the middle Topic is solved
- Replies: 10
- Views: 1499
RegEx - Extracting the text block in the middle Topic is solved
I have the following text and I would like to extract only the middle block that begins with the first date string and ends with the last decimal string on the last line of the block to be extracted and just before the last line that begins with Currency: USD. As for my efforts, I can use something ...
- 20 Jan 2019, 21:17
- Forum: Ask for Help (v1)
- Topic: Sorting Rows of 8 Columns (Comma or Tab Separated) Topic is solved
- Replies: 18
- Views: 3327
Re: Sorting Rows of 8 Columns (Comma or Tab Separated) Topic is solved
Thanks, I also tested and looks good so far. Now this is a comprehensive solution!
- 19 Jan 2019, 12:32
- Forum: Ask for Help (v1)
- Topic: How to find duplicate lines? Topic is solved
- Replies: 17
- Views: 4402
Re: How to find duplicate lines? Topic is solved
I ran your version with my big file of over 4,700 lines. It seems case-sensitive and flexible with various options as you mentioned. Thanks!
- 19 Jan 2019, 02:43
- Forum: Ask for Help (v1)
- Topic: How to find duplicate lines? Topic is solved
- Replies: 17
- Views: 4402
Re: How to find duplicate lines? Topic is solved
I was using sinkfaze's version for a very long file with over 4,700 lines and noticed it not only finds identical lines but also strings within those lines (and in my longer file version, space, hyphen and some other cases as duplicates) as demonstrated in this short version below: #NoEnv #SingleIns...
- 18 Jan 2019, 03:15
- Forum: Ask for Help (v1)
- Topic: How to find duplicate lines? Topic is solved
- Replies: 17
- Views: 4402
Re: How to find duplicate lines? Topic is solved
This archived thread also provides a few other methods:
https://autohotkey.com/board/topic/9168 ... ith-regex/
https://autohotkey.com/board/topic/9168 ... ith-regex/
- 15 Jan 2019, 15:25
- Forum: Ask for Help (v1)
- Topic: Sorting Rows of 8 Columns (Comma or Tab Separated) Topic is solved
- Replies: 18
- Views: 3327
Re: Sorting Rows of 8 Columns (Comma or Tab Separated) Topic is solved
Thanks rommmcek for a very clear explanation.
- 15 Jan 2019, 06:29
- Forum: Ask for Help (v1)
- Topic: Sorting Rows of 8 Columns (Comma or Tab Separated) Topic is solved
- Replies: 18
- Views: 3327
Re: Sorting Rows of 8 Columns (Comma or Tab Separated) Topic is solved
If column contains additional signs, you have to strip them. For speed you need to do it "on the fly". So use: for 8. column Round(RTrim((StrSplit(A_LoopField, ",").8), "%")*100) and for 5. column Round(LTrim((StrSplit(A_LoopField, ",").5), "%")*100) respectively. The trick is to get pure Integer (...