mikell Posted May 11, 2017 Share Posted May 11, 2017 (edited) OK. Here it is. The final output.txt is the exact copy of your example.txt - so said WinMerge (which was used for precise comparison) All this could be done more compact but I left it as is for better readability and understanding I included some comments, feel free to ask if you need more detailed explanations about the expressions Have fun expandcollapse popup;FileDelete(@ScriptDir & '\output.txt') $a = FileRead(@ScriptDir & '\ahihi.txt') ;$a = FileRead(@ScriptDir & '\New For Process.txt') ; insert a newline before $00, $T etc if they are not preceded by colon $a = StringRegExpReplace($a, '(?<!^|:)(?=\$(?:00|01|03|10|20|25|30|40|45|110|115|120|T|F|200|220))', @crlf) ; delete all content behind $00: and \$200: $a = StringRegExpReplace($a, '(?<=\$00:|\$200:).+', "") ; delete whole lines $01, $03, $30 including newlines $a = StringRegExpReplace($a, '\$(?|01|03|30):.+\R', "") ; delete $=<$=T3*1 $=L01836000613000341*000341 and $=L01836000613000341*000341 things $a = StringRegExpReplace($a, '(\$=<\$=T3\*\d\s*)?(\$=L\d+\*\d+)?', "") ; delete $=P1298*NNNN and \$=> $a = StringRegExpReplace($a, '(\$=P\d+\*\d+)|(\$=>)', "") ; delete footnotes, not including n1 etc or next $x $a = StringRegExpReplace($a, '(\$%\$\?\$%[^\$]+Footnotes[^\$]+)(?=n\d+)?', "") ; insert a newline before $%$?$%, some $T and $M $a = StringRegExpReplace($a, '((?<!^|:)(?=\$%\$\?\$%))|((?<=[a-z]:)(?=\$[TM]))', @crlf) ; move $=S from end of line to start of next line $a = StringRegExpReplace($a, '(\$=S)(\R)', "$2$1") ; OPTIONALS ; replace unwanted newlines in text parts by a horizontal space $a = StringRegExpReplace($a, '(\$T|\$%\$\?\$%)\V+?\K(?<=\w|\.)\R(?=\h?\w)', " ") ; replace multi horizontal spaces by only one $a = StringRegExpReplace($a, '\h+', " ") ; remove horizontal space between $I and $U $a = StringRegExpReplace($a, '(?<=\$I)\h+(?=\$U)', "") FileWrite("output.txt", $a) Edited May 11, 2017 by mikell typo ... how surprising :) tezhihi 1 Link to comment Share on other sites More sharing options...
tezhihi Posted May 11, 2017 Author Share Posted May 11, 2017 (edited) 11 hours ago, mikell said: OK. Here it is. The final output.txt is the exact copy of your example.txt - so said WinMerge (which was used for precise comparison) All this could be done more compact but I left it as is for better readability and understanding I included some comments, feel free to ask if you need more detailed explanations about the expressions Have fun expandcollapse popup;FileDelete(@ScriptDir & '\output.txt') $a = FileRead(@ScriptDir & '\ahihi.txt') ;$a = FileRead(@ScriptDir & '\New For Process.txt') ; insert a newline before $00, $T etc if they are not preceded by colon $a = StringRegExpReplace($a, '(?<!^|:)(?=\$(?:00|01|03|10|20|25|30|40|45|110|115|120|T|F|200|220))', @crlf) ; delete all content behind $00: and \$200: $a = StringRegExpReplace($a, '(?<=\$00:|\$200:).+', "") ; delete whole lines $01, $03, $30 including newlines $a = StringRegExpReplace($a, '\$(?|01|03|30):.+\R', "") ; delete $=<$=T3*1 $=L01836000613000341*000341 and $=L01836000613000341*000341 things $a = StringRegExpReplace($a, '(\$=<\$=T3\*\d\s*)?(\$=L\d+\*\d+)?', "") ; delete $=P1298*NNNN and \$=> $a = StringRegExpReplace($a, '(\$=P\d+\*\d+)|(\$=>)', "") ; delete footnotes, not including n1 etc or next $x $a = StringRegExpReplace($a, '(\$%\$\?\$%[^\$]+Footnotes[^\$]+)(?=n\d+)?', "") ; insert a newline before $%$?$%, some $T and $M $a = StringRegExpReplace($a, '((?<!^|:)(?=\$%\$\?\$%))|((?<=[a-z]:)(?=\$[TM]))', @crlf) ; move $=S from end of line to start of next line $a = StringRegExpReplace($a, '(\$=S)(\R)', "$2$1") ; OPTIONALS ; replace unwanted newlines in text parts by a horizontal space $a = StringRegExpReplace($a, '(\$T|\$%\$\?\$%)\V+?\K(?<=\w|\.)\R(?=\h?\w)', " ") ; replace multi horizontal spaces by only one $a = StringRegExpReplace($a, '\h+', " ") ; remove horizontal space between $I and $U $a = StringRegExpReplace($a, '(?<=\$I)\h+(?=\$U)', "") FileWrite("output.txt", $a) OMG, you mix it together. I dont know this so I already search one by one. after all i know and understand more. Thanks you for support As I tested with some other files. With Example 2.txt the location of $T & $F not same with Example 1 so when run your code the content of footnotes was delete. I remember i noted it for you. Can you check the Example 2 ? On Example 3.txt. I think this Example has not appeared bug or delete content bla bla. However the format of ( See in highlight with text ). Are I correct to use this code below for delete it: $a = StringRegExpReplace($a, '(\$=<\$=T[0-9]+\*\d+[^\$]+)(\$=L\d+\*\d+)?', "") and with this Example. I modified code for delete in footnotes ; delete footnotes, not including n1 etc or next $x $a = StringRegExpReplace($a, '(\$%\$\?\$%[^\$]+Footnotes[^\$]+)(?=\$Tn\d+)', "") Now I'm still testing to find bug @@ Edited May 12, 2017 by tezhihi Link to comment Share on other sites More sharing options...
mikell Posted May 12, 2017 Share Posted May 12, 2017 Unfortunately I currently have to work (so think customers - and my wife too) so I miss time For the moment I advise you to be careful with expressions like [^\$] which means "match any non-$ char" To be more secure you can increase selectivity in footnotes tracking by using [\s-] which means "match space or hyphen" $a = StringRegExpReplace($a, '(\$%\$\?\$%[\s-]+(End\s+)?Footnotes[\s-]+)', "") See you later tezhihi 1 Link to comment Share on other sites More sharing options...
mikell Posted May 13, 2017 Share Posted May 13, 2017 (edited) Back to the headlock You nicely pointed out the problem : how to make regex versatile enough to work on all files BUT secure enough to get invariable results For $T & $F in Example 2 , footnotes can be first deleted selectively, then the newlines can be inserted including an additional condition ($T not preceded by $F) For Example 3, to match both "$=<$=T3*1" and "$=<$=T4*42_USC_300AA-11" the expression may be done a bit less selective : (T\d\*\S+\s*) this should work as long as the sequences to match end with a space Sooo... version 2 : FileDelete(@ScriptDir & '\output.txt') $a = FileRead(@ScriptDir & '\ahihi.txt') ; delete footnotes, selective $a = StringRegExpReplace($a, '(\$%\$\?\$%[\s-]+(End\s+)?Footnotes[\s-]+)', "") ; insert a newline before $00, $T etc if they are not preceded by start of text, colon or $F $a = StringRegExpReplace($a, '(?<!^|:|\$F)(?=\$(?|00|01|03|10|20|25|30|40|45|110|115|120|F|T|200|220))', @crlf) ; delete all content behind $00: and \$200: $a = StringRegExpReplace($a, '(?<=\$00:|\$200:).+', "") ; delete whole lines $01, $03, $30 including newlines $a = StringRegExpReplace($a, '\$(?|01|03|30):.+\R', "") ; delete $=< , $=T3*1 , $=T4*42_USC_300AA-11 , $=L01836000613000341*000341 , $=P1298*n , $=> $a = StringRegExpReplace($a, '\$=(?|<|(T\d\*\S+\s*)|([LP]\d+\*\d+)|>)', "") ; insert a newline before $%$?$% , and before $T & $M if preceded by letter+colon $a = StringRegExpReplace($a, '(?=\$%\$\?\$%)|((?<=[a-z]:)(?=\$[TM]))', @crlf) ; move $=S from end of line to start of next line $a = StringRegExpReplace($a, '(\$=S)(\R)', "$2$1") ; OPTIONALS ; replace unwanted newlines in text parts by a horizontal space $a = StringRegExpReplace($a, '(\$T|\$%\$\?\$%)\V+?\K(?<=\w|\.)\R(?=\h?\w)', " ") ; replace multi horizontal spaces by only one $a = StringRegExpReplace($a, '\h+', " ") ; remove horizontal space between $I and $U $a = StringRegExpReplace($a, '(?<=\$I)\h+(?=\$U)', "") FileWrite("output.txt", $a) Edited May 13, 2017 by mikell tezhihi 1 Link to comment Share on other sites More sharing options...
tezhihi Posted May 15, 2017 Author Share Posted May 15, 2017 (edited) On 5/13/2017 at 3:24 PM, mikell said: Back to the headlock You nicely pointed out the problem : how to make regex versatile enough to work on all files BUT secure enough to get invariable results For $T & $F in Example 2 , footnotes can be first deleted selectively, then the newlines can be inserted including an additional condition ($T not preceded by $F) For Example 3, to match both "$=<$=T3*1" and "$=<$=T4*42_USC_300AA-11" the expression may be done a bit less selective : (T\d\*\S+\s*) this should work as long as the sequences to match end with a space Sooo... version 2 : FileDelete(@ScriptDir & '\output.txt') $a = FileRead(@ScriptDir & '\ahihi.txt') ; delete footnotes, selective $a = StringRegExpReplace($a, '(\$%\$\?\$%[\s-]+(End\s+)?Footnotes[\s-]+)', "") ; insert a newline before $00, $T etc if they are not preceded by start of text, colon or $F $a = StringRegExpReplace($a, '(?<!^|:|\$F)(?=\$(?|00|01|03|10|20|25|30|40|45|110|115|120|F|T|200|220))', @crlf) ; delete all content behind $00: and \$200: $a = StringRegExpReplace($a, '(?<=\$00:|\$200:).+', "") ; delete whole lines $01, $03, $30 including newlines $a = StringRegExpReplace($a, '\$(?|01|03|30):.+\R', "") ; delete $=< , $=T3*1 , $=T4*42_USC_300AA-11 , $=L01836000613000341*000341 , $=P1298*n , $=> $a = StringRegExpReplace($a, '\$=(?|<|(T\d\*\S+\s*)|([LP]\d+\*\d+)|>)', "") ; insert a newline before $%$?$% , and before $T & $M if preceded by letter+colon $a = StringRegExpReplace($a, '(?=\$%\$\?\$%)|((?<=[a-z]:)(?=\$[TM]))', @crlf) ; move $=S from end of line to start of next line $a = StringRegExpReplace($a, '(\$=S)(\R)', "$2$1") ; OPTIONALS ; replace unwanted newlines in text parts by a horizontal space $a = StringRegExpReplace($a, '(\$T|\$%\$\?\$%)\V+?\K(?<=\w|\.)\R(?=\h?\w)', " ") ; replace multi horizontal spaces by only one $a = StringRegExpReplace($a, '\h+', " ") ; remove horizontal space between $I and $U $a = StringRegExpReplace($a, '(?<=\$I)\h+(?=\$U)', "") FileWrite("output.txt", $a) Hi @mikell welcome you. I think for solve 2 problem below: 1. About $T preceded by $F: $a = StringRegExpReplace($a, '((\$T)|(\$%\$\?\$%))((\R)(\$F)(n\d+)', "$3$1$4") 2. And for insert a newline before $%$?$%, before $T, $M and $=S if preceded by letter+colon $a = StringRegExpReplace($a, '((?<!^|:)(?=\$%\$\?\$%))|((?<=[a-z]:)((?=\$[TM])|(?=\$=S)))|(?=\$=S)', @crlf) I have just mix 2 version together and edit a little bit and need you check the correctness for me . Thanks you for support Edited May 15, 2017 by tezhihi Link to comment Share on other sites More sharing options...
mikell Posted May 15, 2017 Share Posted May 15, 2017 (edited) Argh... you directly jumped to a conclusion/solution but I need to understand first What was wrong with my version 2 precisely ? Edit - there is a closing parenthesis missing in your expression 1 Tip : you may put (?x) at the beginning, this allows to include white spaces in the expression for a better readability '(?x) ( (\$T) | (\$%\$\?\$%) ) ( (\R)(\$F)(n\d+) ' - expression 2 doesn't insert a newline before $%$?$% if preceded by a colon - see Example3 output, lines 70 to 76 and 202 to 209 Edited May 15, 2017 by mikell Link to comment Share on other sites More sharing options...
tezhihi Posted May 15, 2017 Author Share Posted May 15, 2017 (edited) 3 hours ago, mikell said: Argh... you directly jumped to a conclusion/solution but I need to understand first What was wrong with my version 2 precisely ? Edit - there is a closing parenthesis missing in your expression 1 Tip : you may put (?x) at the beginning, this allows to include white spaces in the expression for a better readability '(?x) ( (\$T) | (\$%\$\?\$%) ) ( (\R)(\$F)(n\d+) ' - expression 2 doesn't insert a newline before $%$?$% if preceded by a colon - see Example3 output, lines 70 to 76 and 202 to 209 awwwwwwwwww srrrrrrrrrrrr i forgot provide you image The Expression 1 for if I use the code for expression 1 on previous post $Fnx will be replace = $T. Can you check and provide the other expression And as I saw in Example 3 and i wanna add more $=S or $=S preceded by letter or colon $a = StringRegExpReplace($a, '(?=\$%\$\?\$%)|((?<=[a-z]:)((?=\$[TM])|(?=\$=S)))|(?=\$=S)', @crlf) Can you explain for me the mean of expression at version 1 ((?<!^|:)(?=\$%\$\?\$%)) Edited May 15, 2017 by tezhihi Link to comment Share on other sites More sharing options...
mikell Posted May 15, 2017 Share Posted May 15, 2017 (edited) ((?<!^|:)(?=\$%\$\?\$%)) (?<! ...) = not preceded by ... (?= ...) = followed by ... both are zero-length assertions, they don't capture and match a position (?<!^|:) = with the alternation, means not preceded by ^ (beginning of text) or : (colon) Edited May 15, 2017 by mikell tezhihi 1 Link to comment Share on other sites More sharing options...
tezhihi Posted May 15, 2017 Author Share Posted May 15, 2017 (edited) 40 minutes ago, mikell said: ((?<!^|:)(?=\$%\$\?\$%)) (?<! ...) = not preceded by ... (?= ...) = followed by ... both are zero-length assertions, they don't capture and match a position (?<!^|:) = with the alternation, means not preceded by ^ (beginning of text) or : (colon) Thanks you. One more problem I think will be solve with $a = StringRegExpReplace($a, '(\$(?|40|45|120):)\R(?=\$%\$\?\$%)', "$1$2") Im waiting for answer from you Edited May 15, 2017 by tezhihi Link to comment Share on other sites More sharing options...
mikell Posted May 15, 2017 Share Posted May 15, 2017 (edited) Remember : lookahead and lookbehind assertions are not-capturing, so "$2" matches nothing Could also be written like this $a = StringRegExpReplace($a, '(?<=\$(?|40|45|120):)\R(?=\$%\$\?\$%)', "") which means : match \R preceded by .. and followed by .. and delete it You could even try $a = StringRegExpReplace($a, '(?<=\$(\d{2}|\d{3}):)\R(?=\$%\$\?\$%)', "") which means : match \R preceded by ($ and 2 or 3 digits and colon) and followed by ... etc If you start falling into a regex addiction I strongly suggest to re-read the helpfile page and look for the lookaround features - and some other very useful things Edited May 15, 2017 by mikell tezhihi 1 Link to comment Share on other sites More sharing options...
tezhihi Posted May 15, 2017 Author Share Posted May 15, 2017 (edited) 21 hours ago, mikell said: Remember : lookahead and lookbehind assertions are not-capturing, so "$2" matches nothing Could also be written like this $a = StringRegExpReplace($a, '(?<=\$(?|40|45|120):)\R(?=\$%\$\?\$%)', "") which means : match \R preceded by .. and followed by .. and delete it You could even try $a = StringRegExpReplace($a, '(?<=\$(\d{2}|\d{3}):)\R(?=\$%\$\?\$%)', "") which means : match \R preceded by ($ and 2 or 3 digits and colon) and followed by ... etc If you start falling into a regex addiction I strongly suggest to re-read the helpfile page and look for the lookaround features - and some other very useful things Oh sorry I have read some function of regex. It can solve my problem faster. However I can use only some simple function on regex and cannot arrangement logic. Due to target from client I wanna complete these files and convert them to XML format. The first I need to clean the file (it mean un string all of them) as two version of expression you provided for me. The second is convert to XML with tool of Production. The first will be complete with help from you. Thanks you for support me and help me understand more function of regex. I received multiple files like that from client and they have many case not same each others so I already mixed code while I dont understanding the define of expression. And I have problem about language, I'm from Vietnam and some key word can not understand clearly so I can understand a little bit on help file. I'm trying to read and understand ( maybe chat with google translate ). I already skipped read about "assertions". Yayyyy after a few minutes. I think I were understand about look-ahead and look-behind if I use your expression you provided for me. It can not work but when I try with expression below: $a = StringRegExpReplace($a, '(?<=\$\d{2}:|\d{3}:)\R(?=\$T|\$%\$\?\$%)', "") the Script can run successfully . And if use '\x' the value is fixed right ? Edited May 16, 2017 by tezhihi Link to comment Share on other sites More sharing options...
tezhihi Posted May 18, 2017 Author Share Posted May 18, 2017 (edited) Hi @mikell can you check for me the correctness of the expression below for the Example 4.txt ; not preceded by $% or $? (ignore $%$?$%) and followed $% by text or number $a = StringRegExpReplace($a, '(?<!(\$%)|(\$\?))(?=\$%([a-z]|\d+))', @CRLF) ; or ; preceded by text and followed by number $a = StringRegExpReplace($a, '(?<=[A-Za-z])(?=\$%\d)', @crlf) ; preceded by number and followed by text $a = StringRegExpReplace($a, '(?<=\d)(?=\$%[A-Za-z])', @crlf) ; preceded by text and followed by text $a = StringRegExpReplace($a, '(?<=[A-Za-z])(?=\$%[A-Za-z])', @crlf) ; preceded by number and followed by number $a = StringRegExpReplace($a, '(?<=\d)(?=\$%\d)', @crlf) ; preceded by number and followed by non-digit $a = StringRegExpReplace($a, '(?<=\d)(?=\$%\D)', @crlf) I want to insert new line for all $% for this file without affected by other $x Edited May 18, 2017 by tezhihi Link to comment Share on other sites More sharing options...
mikell Posted May 18, 2017 Share Posted May 18, 2017 (edited) Hi You might try this ; position ; not preceded by $% or $?, followed by $% and a non-$ char $a = StringRegExpReplace($a, '(?<!\$[%\?])(?=\$%[^\$])', @CRLF) ; or ; not preceded by $% or $?, followed by $% and a word char $a = StringRegExpReplace($a, '(?<!\$[%\?])(?=\$%\w)', @CRLF) Edit Sorry, I didn't see the edit in your previous post backslash is used to make special characters literal. "$" in regex usually means "end of text", "\$" means the literal $ char Edited May 18, 2017 by mikell tezhihi 1 Link to comment Share on other sites More sharing options...
tezhihi Posted June 10, 2017 Author Share Posted June 10, 2017 Hi @mikell longtime no ask something . Can you advise me how to search all of hexa code of example below: ñ á Â æ à å ä — • Link to comment Share on other sites More sharing options...
mikell Posted June 10, 2017 Share Posted June 10, 2017 Hi There are many possible regex patterns depending of the context The strictest could be this #Include <Array.au3> $s = "ñ" & @crlf & _ "á" & @crlf & _ "Â" & @crlf & _ "æ" & @crlf & _ "à" & @crlf & _ "å" & @crlf & _ "ä" & @crlf & _ "—" & @crlf & _ "•" ;msgbox(0,"", $s) $r = StringRegExp($s, '&#x((?:[[:xdigit:]]{2}){1,2})', 3) _ArrayDisplay($r) tezhihi 1 Link to comment Share on other sites More sharing options...
jchd Posted June 10, 2017 Share Posted June 10, 2017 These are escapes for Unicode characters beyond 7-bit ASCII. It would seem logical to replace every occurence by the corresponding Unicode character: $s = "Something with sequences like ñ á Â æ à å ä or even — or • should be turned to plain Unicode!" $s = Execute('"' & StringRegExpReplace($s, '&#x((?:[[:xdigit:]]{2}){1,2});', '" & ChrW(0x$1) & "') & '"') MsgBox(0, "Now reading", $s) tezhihi 1 This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
tezhihi Posted June 12, 2017 Author Share Posted June 12, 2017 (edited) On 6/10/2017 at 1:03 PM, mikell said: Hi There are many possible regex patterns depending of the context The strictest could be this #Include <Array.au3> $s = "ñ" & @crlf & _ "á" & @crlf & _ "Â" & @crlf & _ "æ" & @crlf & _ "à" & @crlf & _ "å" & @crlf & _ "ä" & @crlf & _ "—" & @crlf & _ "•" ;msgbox(0,"", $s) $r = StringRegExp($s, '&#x((?:[[:xdigit:]]{2}){1,2})', 3) _ArrayDisplay($r) On 6/10/2017 at 2:47 PM, jchd said: These are escapes for Unicode characters beyond 7-bit ASCII. It would seem logical to replace every occurence by the corresponding Unicode character: $s = "Something with sequences like ñ á Â æ à å ä or even — or • should be turned to plain Unicode!" $s = Execute('"' & StringRegExpReplace($s, '&#x((?:[[:xdigit:]]{2}){1,2});', '" & ChrW(0x$1) & "') & '"') MsgBox(0, "Now reading", $s) Thanks you @mikell and @jchd and I have more question need to ask In text file appears too many sequences like: Case 1 (Ignore) $Q*2* $B*9* $J*9* $G*9* $Y*9* $R*9* Case 2 (Find and Replace) SB-3* SE-6******** SC3-4* SC*** SD** text text * text text and problem need to solve here is I need to find and replace all symbol "*" to "*" at any case ( see Case 2 ) without affect with case 1. However my RegEx not replace (SB-3*, SE-6********, ...) because I added (\d+) . Please see my RegEx below and advise me the better RegEx for this case. ; Not preceded by Q B J G Y R and Number and not followed by number StringRegExpReplace($a, '(?<![Q|B|J|G|Y|R|\d+])\*(?!\d+)', '*') Oh I think this problem will be solve. Please check correctness of RegEx below and advise me. Thanks $a = StringRegExpReplace($a, '(?<![Q|B|J|G|Y|R|\d+])\*(?!\d+)', '*') $a = StringRegExpReplace($a, '(?<=\-\d)\*', '*') Edited June 12, 2017 by tezhihi Link to comment Share on other sites More sharing options...
mikell Posted June 12, 2017 Share Posted June 12, 2017 You don't need alternations in the class, and the "+" in the lookahead is useless $a = StringRegExpReplace($a, '(?<![QBJGYR\d])\*(?!\d)', '*') Assuming that the $ sign is present in the "ignore" but not in the "replace" parts, this could work $a = StringRegExpReplace($a, '(?x) (?<! \$[A-Z] | \*\d) \*' , "*") tezhihi 1 Link to comment Share on other sites More sharing options...
tezhihi Posted June 12, 2017 Author Share Posted June 12, 2017 (edited) 57 minutes ago, mikell said: You don't need alternations in the class, and the "+" in the lookahead is useless $a = StringRegExpReplace($a, '(?<![QBJGYR\d])\*(?!\d)', '*') Assuming that the $ sign is present in the "ignore" but not in the "replace" parts, this could work $a = StringRegExpReplace($a, '(?x) (?<! \$[A-Z] | \*\d) \*' , "*") Thanks you @mikell in case 2 please explain for me about (?x). I have read but can not understand clearly. Edited June 12, 2017 by tezhihi Link to comment Share on other sites More sharing options...
jchd Posted June 12, 2017 Share Posted June 12, 2017 @tezhihi, Look at StringRegExp help. You'll find that this option allows unsignificant whitespaces in a pattern, for best readability. OTOH with ?x option, significant whitespaces (hex 0x20) need to be escaped as backslash space or \x20. tezhihi 1 This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now