Jump to content

How to use StringRegExpReplace keep unknow character itself and replcae


Recommended Posts

Sample 1

how to use StringRegExpReplace replace additional character but keep itself

Global $String_1 = "ABC12+ABC34-AB5>CD60=CD50"

Global $String_2 = "ABC12 + ABC34 - AB5 > CD60 = CD50"

$String_2 = StringRegExpReplace($String_1, "\W\D", " \W\D ")

the sample, String_1 with 4 characters (+ - > = are different, but need keep itself and add white space (before and after)

and not every string with these 4 characters maybe others character

 

Sample 2

String_1's ???? means I don't know what word/digital or character and number of it, but I need to keep itself, and replace A15F to 123456

Global $String_1 = "<TD> BKColor=#FF12BC TextColor=#ACF9F9 <span> ABC > ???? </span> > A15F </TD>"

Global $String_2 = "<TD> BKColor=#FF12BC TextColor=#ACF9F9 <span> ABC > ???? </span> > 123456 </TD>"

$String_2 = StringRegExpReplace($String_1, " <span> ABC > ???? </span> > [\w\d] </TD>", " <span> ABC > ???? </span> > 123456 </TD>")

A15F still not a fixd number, maybe 4 or 5  characters ... maybe more

Edited by jimmy123j
Link to post
Share on other sites
  • jimmy123j changed the title to How to use StringRegExpReplace keep unknow character itself and replcae

You can use \0 - \9 (or $0 - $9) to back-reference replacements.

Quote
replace The text to replace the regular expression matching text with. To insert matched group text, \0 - \9 (or $0 - $9) can be used as back-references. (See remarks)

Example: (using Sample 2)

Global $String_1 = "<TD> BKColor=#FF12BC TextColor=#ACF9F9 <span> ABC > ???? </span> > A15F </TD>"

Global $String_2 = "<TD> BKColor=#FF12BC TextColor=#ACF9F9 <span> ABC > ???? </span> > 123456 </TD>"

$String_2 = StringRegExpReplace($String_1, " <span> ABC > ???? </span> > [\w\d] </TD>", " <span> ABC > ???? </span> > $1 </TD>")

ConsoleWrite($String_2)

Output:

Quote

<TD> BKColor=#FF12BC TextColor=#ACF9F9 <span> ABC > ???? </span> > A15F </TD>

 

Link to post
Share on other sites
Posted (edited)
12 minutes ago, Luke94 said:

You can use \0 - \9 (or $0 - $9) to back-reference replacements.

Example: (using Sample 2)

Global $String_1 = "<TD> BKColor=#FF12BC TextColor=#ACF9F9 <span> ABC > ???? </span> > A15F </TD>"

Global $String_2 = "<TD> BKColor=#FF12BC TextColor=#ACF9F9 <span> ABC > ???? </span> > 123456 </TD>"

$String_2 = StringRegExpReplace($String_1, " <span> ABC > ???? </span> > [\w\d] </TD>", " <span> ABC > ???? </span> > $1 </TD>")

ConsoleWrite($String_2)

Output:

 

thanks for reply, but I need string_2 output is

$String_2 = "<TD> BKColor=#FF12BC TextColor=#ACF9F9 <span> ABC > ???? </span> > 123456 </TD>"

and ???? need keep itself

 

for example

Global $String_1 = "<TD> BKColor=#FF12BC TextColor=#ACF9F9 <span> ABC > >(12, 11) </span> > 1Anzx </TD>"
Global $String_2 = "<TD> BKColor=#FF12BC TextColor=#ACF9F9 <span> ABC > >(10, 9) </span> > aksw </TD>"
Global $String_3, $String_4

$String_1 and $String_2 use same StringRegExpReplace to output as $String_3 and $String_4

$String_3 / $String_4 = StringRegExpReplace(String_1 / $String_2, "<span> ABC > >\w\d </span> > \w\d </TD>", "<span> ABC > >\w\d </span> > ABC </TD>")

$String_3 = "<TD> BKColor=#FF12BC TextColor=#ACF9F9 <span> ABC > >(12, 11) </span> > ABC </TD>"
$String_4 = "<TD> BKColor=#FF12BC TextColor=#ACF9F9 <span> ABC > >(10, 9) </span> > ABC </TD>"

 

Edited by jimmy123j
Link to post
Share on other sites
  • Moderators

jimmy123j,

This seems to do the trick:

$sString_1 = "ABC12+ABC34-AB5>CD60=CD50"

$sString_2 = StringRegExpReplace($sString_1, "(\W)", " $1 ")

ConsoleWrite($sString_2 & @CRLF)

$sString_1 = "<TD> BKColor=#FF12BC TextColor=#ACF9F9 <span> ABC > ???? </span> > A15F </TD>"

$sString_2 = StringRegExpReplace($sString_1, "^(.*> >).*(</TD>)$", "$1 123456 $2")

ConsoleWrite($sString_2 & @CRLF)

Please ask if you have any questions.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to post
Share on other sites
17 minutes ago, Melba23 said:

jimmy123j,

This seems to do the trick:

$sString_1 = "ABC12+ABC34-AB5>CD60=CD50"

$sString_2 = StringRegExpReplace($sString_1, "(\W)", " $1 ")

ConsoleWrite($sString_2 & @CRLF)

$sString_1 = "<TD> BKColor=#FF12BC TextColor=#ACF9F9 <span> ABC > ???? </span> > A15F </TD>"

$sString_2 = StringRegExpReplace($sString_1, "^(.*> >).*(</TD>)$", "$1 123456 $2")

ConsoleWrite($sString_2 & @CRLF)

Please ask if you have any questions.

M23

Thanks Melba23, it's work and I'll try the script tomorrow

and could you mind to explain the logic ?

because I still can't figure out the RegExp pattern's logic for this sample

Thanks your help

Link to post
Share on other sites
  • Moderators

jimmy123j,

Certainly.

Regex 1:  

"(\W)" - Look for any non-word character

" $1 " - Replace it with the same character with a leading and trailing space

Regex 2:

"^     - From the beginning of the string
(.*> >) - Capture everything up and including to "> >"
.*      - Ignore the next set of characters
(</TD>) - Until "</TD>, which is captured
$"      - At the end of the string

"$1 123456 $2" - Return the 2 captured strings with " 123456 " in between

Clearer now?

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to post
Share on other sites
Posted (edited)

a little bit, thanks Melba23, I practice RegExpReplace online and learn more

but still have problem with this issue, seem without Unique target can be separated

$String_0 = "<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(11,15)=1 '>1</span></TD>
<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(16,15)=1 '>1</span></TD>
<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(17,15)=120 120 '>120</span></TD>
<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(18,15)=1 '>1</span></TD>
<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(28,15)=111 111 111 111 '>123</span></TD>
<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(30,15)=63 63 '>63</span></TD>
<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(31,15)=70 70 '>70</span></TD>
<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(32,15)=120 111 '>120</span></TD>
<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(33,15)=1 '>1</span></TD>
<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(9,1)=123 120 '>120</span></TD>"

$String_2 = StringRegExpReplace($String_0, "(<span title='\(.*?,.*?\)=.*? '>)120(</span></TD>)", "$1 @@ $2")

 

I want to RegExpReplace all 120</span>'s style='color:#F2F2F2' to style='color:#FF99FF'

sample

<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(17,15)=120 120 '>120</span></TD>

<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(32,15)=120 120 '>120</span></TD>

to

<TD width=28 BGCOLOR=#F2F2F2 style='color:#FF99FF'><span title='(17,15)=120 120 '>120</span></TD>

<TD width=28 BGCOLOR=#F2F2F2 style='color:#FF99FF'><span title='(32,15)=120 120 '>120</span></TD>

Edited by jimmy123j
Link to post
Share on other sites

Your questions are not stupid, regex is tricky to learn
Feel free to ask if you can't understand the pattern used in the code below

$String_0 = "<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(11,15)=1 '>1</span></TD>" & @crlf & _ 
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(16,15)=1 '>1</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(17,15)=120 120 '>120</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(18,15)=1 '>1</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(28,15)=111 111 111 111 '>123</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(30,15)=63 63 '>63</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(31,15)=70 70 '>70</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(32,15)=120 111 '>120</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(33,15)=1 '>1</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(9,1)=123 120 '>120</span></TD>"

$res = StringRegExpReplace($String_0, '(?m)^.+:#\K\w{6}(?=.+>120</span>)', "FF99FF")
Msgbox(0,"", $res)

 

Edited by mikell
typo
Link to post
Share on other sites
Posted (edited)

Thanks mikell,  I'll try on Monday

Yes, this time I finally know the regex is very power feature, I hope I can more understand regex for I script

 

And could you mind explain the logic with green color (confuse with combination) 

and why use #\K\w not just use \w, I'm not understand \K purpose

does it means get the last one, as ? can get the first one !?

(?m)^.+:#\K\w{6}(?=.+>120</span>)

 

Sorry for ask 2nd question, for this sample I know the coordinate (16,17), (28,15) and (34,7) and try to change

"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(16,17)=1 '>1</span></TD>"

"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(28,15)=111 111 111 111 '>123</span></TD>"

to

"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(16,17)=1 '>99</span></TD>"

"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(28,15)=111 111 111 111 '>99</span></TD>"

$String_0 = "<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(11,5)=1 '>1</span></TD>" & @crlf & _ 
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(16,17)=1 '>1</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(17,1)=120 120 '>120</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(28,15)=111 111 111 111 '>123</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(3,28)=63 63 '>63</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(34,7)=70 70 '>70</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(14,31)=120 111 '>120</span></TD>"

$String_1 = "<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(11,5)=1 '>1</span></TD>" & @crlf & _ 
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(16,17)=1 '>99</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(17,1)=120 120 '>120</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(28,15)=111 111 111 111 '>99</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(3,28)=63 63 '>63</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(34,7)=70 70 '>99</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(14,31)=120 111 '>120</span></TD>"

I try to used StringRegExpReplace($String_0, "(<span title='(16,17)=.*? '>)120(</span></TD>)", "$1 99 $2") with coordinate in for loop

but not all change success, sometime will catch at wrong start position then change fail

Thanks for your help again !!

Edited by jimmy123j
Link to post
Share on other sites
3 hours ago, jimmy123j said:

And could you mind explain the logic

(?m)^.+:#\K\w{6}(?=.+>120</span>)

Yes I can :)

(?m) : multiline option. In this mode, "^" matches at each start of line
^.+:#\K : from the beginning of the line, one or more chars up to ":#". The added \K means "forget (don't replace) this"
\w{6} : 6 word chars
(?=.+>120</span>) : followed (?=) by one or more chars AND the string ">120</span>" . If this string is not present then the replacement must fail

For your 2nd question, as you do single replacements it's much simpler to use StringReplace :

StringReplace($string, "(16,17)=1 '>1</span>", "(16,17)=1 '>99</span>")

 

 

Link to post
Share on other sites
Posted (edited)

Thanks for anwser, still try to figure out

sorry, if I want to cache the green color and RegExgReplace it, how about the pattern can be expressed more easily ?

$String_0 = "<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(11,5)=1 '>1</span></TD>" & @crlf & _ 
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(16,17)=1 '>1</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(17,1)=120 120 '>120</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(28,15)=111 111 111 111 '>123</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(3,28)=63 63 '>63</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(34,7)=70 70 '>70</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(14,31)=120 111 '>120</span></TD>"
$res = StringRegExpReplace($String_0, "(?m)^(<TD width=28 )BGCOLOR=#F2F2F2 style='color:#F2F2F2'(.*?=.+>120</span>)", "$1 @ $2")

I try to revise your sample and luckly work, but still try to understand the =.+ reason, 'cause without it will fail

 

for 2nd question, the blue color is random (I don't know), only know is the green color, and replace to black color 99

$String_0 = "<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(11,5)=1 '>1</span></TD>" & @crlf & _ 
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(16,17)=1 '>1</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(17,1)=120 120 '>120</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(28,15)=111 111 111 111 '>123</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(3,28)=63 63 '>63</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(34,7)=70 70 '>70</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(14,31)=120 111 '>120</span></TD>"

$String_1 = "<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(11,5)=1 '>1</span></TD>" & @crlf & _ 
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(16,17)=1 '>99</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(17,1)=120 120 '>120</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(28,15)=111 111 111 111 '>99</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(3,28)=63 63 '>63</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(34,7)=70 70 '>99</span></TD>" & @crlf & _
"<TD width=28 BGCOLOR=#F2F2F2 style='color:#F2F2F2'><span title='(14,31)=120 111 '>120</span></TD>"

so I can't use stringreplace to replace it

StringReplace($string, "(16,17)=1 '>1</span>", "(16,17)=1 '>99</span>")

 

I try to add (?m) as your explain and it's work at last my temp. example, and I'll try tomorrow for my script

I think (?m) is good to solve none unique source (of cause need to add @CRLF first) 

$res = StringRegExpReplace($String_0, "(?m)(^.*<span title='\(17,15\)=.*? '>)120(</span></TD>)", "$1 @@ $2")

 

Thanks for your kindly teached and explained mikell, sorry for waste your time

If I have new question hope you can teach again, thanks again

btw, RegExg really powerful and interesting

Edited by jimmy123j
Link to post
Share on other sites
2 hours ago, jimmy123j said:

still try to understand the =.+ reason

(?= ... )  is NOT a group. It is an assertion, a lookahead (a test) which means "followed by ..."
So  (?=abc)  means "followed by abc", and (?=.+abc) means "followed by one or more chars and abc"
The help file is your friend  ;)

Link to post
Share on other sites

Sorry for bother @mikell, does RegExp and RegExpReplace with 259 length limitation ? 

Single and multiple line data with same issue as script, and I use RegExp Online Tool to check the script is normal
 

$String_0 =  "<TR></TD><TD>67</TD><TD><a href=http://111111111111111111111111111111111111111111111111111>22222222222222</a></TD><TD>" & _
"<a href=http://33333333333333333333333333333333333333333333333333333333333333333333333333333><img border='0' src='WM1.png' width='32' height='123'>"


$res = StringRegExp($String_0, "(?m)^<TR.*", 3)

res = "<TR></TD><TD>67</TD><TD><a href=http://111111111111111111111111111111111111111111111111111>22222222222222</a></TD><TD>" & _
"<a href=http://33333333333333333333333333333333333333333333333333333333333333333333333333333><img border='0' src='WM1.png' width='32' height="
Edited by jimmy123j
Link to post
Share on other sites

I can't reproduce your issue
StringRegExp returns an array, so this works for me

$String_0 =  "<TR></TD><TD>67</TD><TD><a href=http://111111111111111111111111111111111111111111111111111>22222222222222</a></TD><TD>" & _
"<a href=http://33333333333333333333333333333333333333333333333333333333333333333333333333333><img border='0' src='WM1.png' width='32' height='123'>"

$res = StringRegExp($String_0, "(?m)^<TR.*", 3)[0]
ConsoleWrite($res)

 

Link to post
Share on other sites
1 hour ago, jimmy123j said:

does RegExp and RegExpReplace with 259 length limitation ?

Did some regex eat the verb? Your phrase makes no sense as is.

BTW there is no 259-char limitation, whatever that means.

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 here
RegExp tutorial: enough to get started
PCRE 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 post
Share on other sites

Hi mikell and jchd, sorry my bad

I use _arraydisplay to check the RegEx data and only show 259 characters every each row, seems _arraydiplay's issue

 

And thanks for this script mikell, I don't know array data can use this mode 

$res = StringRegExp($String_0, "(?m)^<TR.*", 3)[0]
Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...