Author Topic: Pattern problem  (Read 2233 times)

0 Members and 1 Guest are viewing this topic.

Offline Leun

  • Scripter
  • Fulll Member
  • ******
  • Posts: 64
  • Karma: +7/-0
Pattern problem
« on: 27 January, 2008, 21:58:49 »
Morning,

What is the right pattern match for the code below?

Code: [Select]
for arg,value in string.gmatch(sLine,"(%b[])=(%b"")") do


Get this error:
[21:36] Syntax vliegen/bancatch.lua:209: ')' expected near '")"

I try to find all data between the " and "

example:
["Message"]= "Warn who [uu.nl]double_trouble(155.06 Gb), minshare 100 Gb for movies\\Mr. & Mrs. Smith (2005)\\s"

greetz

PtokaX forum

Pattern problem
« on: 27 January, 2008, 21:58:49 »

Offline Leun

  • Scripter
  • Fulll Member
  • ******
  • Posts: 64
  • Karma: +7/-0
Re: Pattern problem
« Reply #1 on: 27 January, 2008, 22:27:39 »
Thnx American Idiot !!
I'll give it a try :P

Greetz

Offline Leun

  • Scripter
  • Fulll Member
  • ******
  • Posts: 64
  • Karma: +7/-0
Re: Pattern problem
« Reply #2 on: 27 January, 2008, 22:34:45 »
Thnx a lot American Idiot!!

I get it work now:
I changed the function a little bit..
But the pattern is working :P
Code: [Select]
for arg,value in string.gmatch(sLine,"(%b[])=(%b\"\")") do

greetz,
Leun
« Last Edit: 27 January, 2008, 22:36:59 by Leun »

Offline Leun

  • Scripter
  • Fulll Member
  • ******
  • Posts: 64
  • Karma: +7/-0
Re: Pattern problem
« Reply #3 on: 27 January, 2008, 22:43:18 »
lol no its fine so.

My question wasn't clear I think, but your advise helped me out :D

thnx

PtokaX forum

Re: Pattern problem
« Reply #3 on: 27 January, 2008, 22:43:18 »