Search the Community
Showing results for tags 'Regexp'.
-
Hi everyone, I have this string: "main_lot 0x111” & @CRLF & “main_version 0xABC” & @CRLF & “main_number 0xDEAD123” & @CRLF & “main_version 0x333" And I'm trying to extract one specific hexadecimal number, actually main_version from this string by using StringReg...
-
Well the plan is to use the power of regular expressions engine of AutoIT for patching binary data. Something like this: StringRegExp( $BinaryData, "(?s)\x55\x8B.." <cut> ... Okay straight to question/problem ... certain bytes that are in the range from 0x80 to 0xA0 won't match....
- 24 replies
-
- regexp
- stringregexp
-
(and 2 more)
Tagged with:
-
Version 3.6
2,127 downloads
In April 5, 2013 I ask @Lazycat he answer: Then I change this tool a little. Now I back to this and make bigger changed. Here is new version. Update History: = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =... -
I'm trying to capture everything after a "#ToDo" in my scripts. I got that like this: (?i)[^\v]*#todo(.*) But then I thought it would be nice to use underscores to continue the ToDo... kind of like this: #ToDo: This is a really long explanation about something _ # that is very in-depth an...
-
Inspired by PHP's preg_split. Split string by a regular expression. Also supports the same flags as the PHP equivalent. v1.0.1 Example: #include "StringRegExpSplit.au3" StringRegExpSplit('splitCamelCaseWords', '(?<=\w)(?=[A-Z])') ; ['split', 'Camel', 'Case', 'Words']
-
Is there a way to output the regex matches into a file? I have a script to compare two files and check for regex matches. I want to output the matching regex of 'testexample.txt' to another file. #include <MsgBoxConstants.au3> #include <Array.au3> $Read = FileReadToArray("C:\Users\adm...
- 2 replies
-
- stringregexp
- regex
-
(and 1 more)
Tagged with:
-
Im creating a code that will work in this sequence: 1. Copy the text (question) in one atea of the screen 2. Catch the 2 strings (number) 3. Multiply the 2 strings ( $1*$2) 4. Click the next area to put the answer 5. Paste the answer This is my code M...
-
argh, pulling my hair out. considering this post: say for a string = "03a", how can I strip out the leading 0 and the a. I have tried: $new = StringRegExpReplace($string, '[^1-9][^0-9]', '') and various combinations: ^0+[^0-9] [^[:digit:]] "[^0...
-
Hi everyone! After updating autoit, I tried to run an old program using complex regexp's. It did not work. Eventually I broke the problem down to this example: #include <Array.au3> $buf = "First title" & @CRLF & "Tom" & Chr(0x92) & "s sleepwalking" & @CRLF & "Last | line" & @CRLF...
-
Hello . How to do that $regexp = starts from "abcdef" and after this could be anything in name WinActivate($regexp)
-
Hello, Have been thinking about this for a while, so decided to seek for help. I have the following string: "...<tag>1</tag>...<tag>2</tag>...<tag>3</tag>...", which I need to test if all text within <tag> matches certain criteria, e.g. it's a number "\d+". The trick is 1) I need the entire match to...
-
Hello, I am trying to create a regExp for following HTML text: <a href="link=1">1</a> <b>2</b> <a href="link=3">3</a> | <a href="link=2">Previous</a> | <a href="link=3">Next</a>My intention is to extract href from last <a> tag. Here is my attempt: Local $reg = '(?i)\|\s?<a href="(.*?)">Next</a>...
-
Hello, I want to capitalize 1st word of every sentence with StringRegExp, I am able to collect words by using this pattern: Local $reg = '(?:^|(?:[.!?]\s))(\w+)'now my problem is how can I exactly replace these words, e.g. In the following string: I only want to replace 1st "the" of the sentence w...
-
Hi I am struggeling around with an RegExp I need to check a string, it should only contain digits and a - This is what i have so far StringRegExp($sColData,"[\s\D]",0)which returns true for every non-digit (\D) character including @CR (which should not exist as well) and whitespaces (\s], bu...
-
I'm doing parsing of HTML file with <table>. I need to go through rows and columns of table, ideally to get two dimensional array. I use this way with simple two levels of calling StrinRegExp() for rows and columns: ;~ $html = FileRead('table.html') $html = '<tr><td>r1c1</td> <td>r1c2</td></tr>...