radek
radek

Reputation: 1223

Parser bracket regex

I'm copletly noob of regex, but i'm forced to use it.

I've tried to read other topics about regex butI still have some questios

I have string like this:

a(b(c))d

And I'd like it after while loop to show me something like this:

c
b(c)

I've tried to work with

Regex r = new Regex("/{\"(:\":\"(.*?)\")/");

But it did't work at all

Also can you please recomend me any tutorial or book from where can I lear about regular expressions?

Thanks in advance Radek

Upvotes: 0

Views: 463

Answers (2)

Andrew Hagner
Andrew Hagner

Reputation: 804

If you are using regular expressions to do this than I would suggest first going over some tutorials, like This

In addition, it looks like you are trying to match any parameters within a string, in that case I would suggest reading This Article which describes what looks like a similar scenario.

Upvotes: 0

Sage Gerard
Sage Gerard

Reputation:

If you want to learn more about regular expressions, head to http://www.regular-expressions.info/

Regular expressions and parsing have a crippled relationship at best when dealing with nested content.

Since the pattern you are looking at could go arbitrarily deep, you would need something that can understand the placement of each bracket.

Upvotes: 4

Related Questions