I have an variable that contain following string .
I want only numbers from above string and save these three numbers to three different variable[xshift={\hzwidth+10} ,yshift={-\vtheight+15}, rotate=30]

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
I want only numbers from above string and save these three numbers to three different variable[xshift={\hzwidth+10} ,yshift={-\vtheight+15}, rotate=30]
Hi Kevin,kevin007 wrote:I want only numbers from above string and save these three numbers to three different variable[xshift={\hzwidth+10} ,yshift={-\vtheight+15}, rotate=30]![]()
Code: Select all
if matchText( S, "\+(\d+)}.+\+(\d+)}.+=(\d+)]", n1, n2, n3) then
put "Find: " & n1 && n2 && n3
else
put "Sorry, no match!"
end if
Hi Craig,dunbarx wrote:Thierry can do more with one line of regex than I can in a handful of lines of "ordinary" code.
Well, I think it will be nice to have some 'Livecodish' solutions, and let the readers learn,But are you OK with that, or do you want to talk about those handfuls?
JAMAIS, mon ami!Thierry wrote:Hi Craig,dunbarx wrote:Thierry can do more with one line of regex than I can in a handful of lines of "ordinary" code.
Mmm, I have nothing to do with this fact; that's the power of regex: concise and powerful for
pattern matching.
So be careful when talking to me that I'm not going to cast a spell on youKlaus wrote:Bonsoir Thierry,
JAMAIS, mon ami!
I still consider this WITCHCRAFT!![]()
Thierry wrote:So be careful when talking to me that I'm not going to cast a spell on youKlaus wrote:Bonsoir Thierry,
JAMAIS, mon ami!
I still consider this WITCHCRAFT!![]()
Schönes Wochenende
Regards,
Thierry