OvermindDL1 wrote:
On Mon, Sep 14, 2009 at 6:12 PM, Ramon F Herrera
wrote: More accurately, my question should be:
How hard (or easy) is it to deal with multiple lines of parsed text in Regex?
Is there anything special to do? (such as defining an end of line character(s))
Perhaps the best advice is to stay away from Regex and use something more powerful (such as Xpressive)?
Regex can handle multi-lines easy, it is all a text blob as far as it is concerned. Depending on what you want to use will depend on what you are doing, so what are you trying to parse out?
Hi Overmind, I am trying to parse multiple files with the structure indicated below. I sort of got started, but I hate it if I am going to hit a wall. I guess I could start by defining a line like this: string variable = "([A-Za-z0-9][\\w\\h\\(\\)\\-\\.,/&]*)"; char equal_sign = '='; string value = "(.+)"; string assignment = variable + equal_sign + value; string line = assignment + eol; Any tips and hints are most appreciated and welcome... -Ramon --------------------- [Unique ID 1] Variable Name = Variable Value Variable Name = Variable Value Variable Name = Variable Value [Unique ID 2] Variable Name = Variable Value Variable Name = Variable Value Variable Name = Variable Value [Unique ID 3] Variable Name = Variable Value Variable Name = Variable Value Variable Name = Variable Value