Jump to content

Search the Community

Showing results for tags 'StringRegExp'.

  • Search By Tags

    • stringregexp ×
    Type tags separated by commas.
  • Search By Author

Content Type



Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


  1. 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...
  2. Good morning I'm playing with SRE and trying to obtain some information from a test file. I was testing the pattern on regex101, but when I bring it to AutoIt, it doesn't return the same result as on regex101. I am surely (?:missing some important notes about PCRE engine|the pattern is not co...
  3. 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....
  4. i am trying to get number from string using this code : #include <IE.au3> $oIE = _IEAttach ("Edu.corner") Local $aName = "Student name & Code:", $iaName = "0" Local $oTds = _IETagNameGetCollection($oIE, "td") For $oTd In $oTds If $oTd.InnerText = $aName Then $iaName = $oTd.NextElemen...
  5. 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...
  6. So I have this pattern: ^(?:(\d+)|(\d+):(\d+)|(\d+):(\d+):(\d+))$ And I'm expecting (depending on input) to get a 1, 2 or 3 index array (or @error for invalid input). But instead I get this: #include <Debug.au3> Func Test($String) _DebugArrayDisplay(StringRegExp($String, '^(?:(\d+...
  7. Hi, I want to add any needed conditions to the StringRegExp command so it can pull out only "File.au3", "WinAPIFiles.au3", "Test.bmp" into the array #include <FileConstants.au3> #include <MsgBoxConstants.au3> #include 'WinAPIFiles.au3' #include "File.au3" ; Script Start - Add your code b...
  8. i have a text : <Name>Jonh</Name>.<Age>15</Age> how i can get Jonh and 15 in one stringregexp? pls give me example
  9. I'm looking for a regex genius, cus I'm stumped when it comes to assertions. So what I have now, is this regular expression: ([^|=]+)=([^|]+) It takes a string (user input) of keys=values separated by pipes (ie: "param=value|param=value") and splits them into an array. Example: $vPar...
  10. Hello, I have spent the past day fooling with StringRegExp to no avail attempting to get what would be a simple solution to an issue using StringRegExp. I will post the code in a sec. The string 'Java x Update y' where x and y are numeric values ONLY if a letter is mixed in anywhere then i...
  11. Need help to make function better with full infomation #include <Array.au3> #include <File.au3> _TEST(@ScriptFullPath) _TEST("A:") _TEST("A:\B.c") _TEST("D:\E\F\") _TEST("G:\H/../J.k/") _TEST("M:\N\k..J.k") _TEST("D:\E\F\..\G\G\I..J.K.M") Func _TEST($sFilePath) Local $sDrive = "", $sFullP...
  12. Does anyone know how to split a string using multiple delimiters, returning both the values and delimiters withing the Array using StringRegExp? For example: ;~ Split on " Not ", " And ", " Or " $sString = ' Not $a = 1 And $b = 2 Or $b = 3' $aArray = StringRegExp($sString,...) ;~ Returned Resul...
  13. Hi, I need help string RegEx to get string from CREATE to GO #include <StringConstants.au3> ;~ Global $fileSQL1 = @ScriptDir & "\fileSQL1.sql" ;~ Global $fileSQL2 = @ScriptDir & "\fileSQL2.sql" Global $tmpSQLfile = @TempDir & "\tmpFile.sql" OnAutoItExitRegister("_OnExit") _SetTMPsql() If...
  14. Hi guys I hope you can help me out with this one. I have a text file "test.txt" which could contain something like this: __________________________________________________________ fiw eqw sdg xcv __________________________________________________________ Each stri...
  15. Hello, try to remove all ASCII code and keep numbers. Read about StringRegExp and its flag, but best result is this: $mytxt = "Where have all the flowers gone, long time p33 976 7 6761assing? E#a%t^ m(y) {sh}o=rt\s" MsgBox(0, "Regular Expression Replace Test", StringRegExpReplace($mytxt, "[a...
  16. I do have a question <div class="col-sm-5 text-right"> <a href="/">IP Your adress: 113.228.141.182</a> </div> Is it true? (?U)(\d+\d+\.\d+\.\d+\.\d+.\.)
  17. hello, i'm new to this function so i need some help doing this, btw, i need to clear up my folder of work by deleting some files example file inside folder : info000001 to info999999 but i want to delete files name other than info(number) Func _delete() $dir = @ScriptDir & '\in...
  18. how can I use the StringRegEx function to extract certain lines of text from google search results in the following format: C: server port user password an example is this: C: starteam.myftp.org 18000 test1 text2 regards
  19. Hello altogether, yes I already noticed the StringRegExp AutoIt reference and the very good german tutorial of SEuBo, but nevertheless I would be pleased to get a tip. I have strings like this: 'repair car "do it your self" check' or ' repair car toyota'. There could...
  20. Hello, As always, sorry for my bad english. here is the code i have #include <File.au3> #include <String.au3> $file1 = "d:\doppioniautoit\international.txt" FileOpen($file1, 0) $file2 = "d:\doppioniautoit\standard.txt" FileOpen($file2, 0) For $i = 1 to _FileCountLines($file1) $line = FileReadL...
  21. I have code $pattern = $str = "%abcd% = Section, hardwareID_1, hardwareID_2, ..... ,HardwareID_n" $array = StringRegExp( $str, $pattern, 3)Anyone help me with $pattern value I need $array is : No whitespace in all return string . (Sorry for my English) Thank you verymuch
  22. 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>...
  23. BackRef UDF Working This UDF is made to provide a small interface towards the StringRegExpReplace Autoit function. The extension is very limited but is an easy approach when used properly. Functions User can pass the complete back-reference to a function.The return value from the function is then...
  24. Hi, Trying to parse CSV here: https://regex101.com/r/mM2uP0/2, which gives desirable result, but SrtringRegExp output is a bit different (few empty strings have been returned): So my question would be why? And what's workaround if there's one? Thanks in advance!
  25. Good Afternoon Everyone, First and foremost, thank you for doing what you guys do. I use AutoIT almost every day. It helps the world out... so yes, thank you everyone, sincerely. This is my Regular Expression: <tr>.*(\n|\n.*\n)^<td>.*\n^<td>.*\d{1,2}\sJune\s2014.[\S\s]*?\n</tr> or <tr>.*(\n|\n.*\n)^...
×
×
  • Create New...