![]() Topic awaiting preservation: regex guru needed (Page 1 of 1) |
|
---|---|
Neurotic (0) Inmate Newly admitted From: |
![]() Heres my problem: |
Maniac (V) Mad Scientist From: Rochester, New York, USA |
![]() |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
![]() What you are talking about goes a bit beyond regular expressions. There are ways but your going to run in to a lot of problems. Consider a function with a comment in it where the brackets don't have to match |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
![]() this is outside of the scope of what regexps can do - The simple rule of thumb here is 'regexps don't count'. |
Paranoid (IV) Inmate From: A graveyard of dreams |
![]() TP's solution seems like a nice solution. If you allow comments inside the functions you should also take note of that so you don't cound brackets inside those (like bitdamaged mentioned). |
Nervous Wreck (II) Inmate From: |
![]() While bitdamaged brings up a good point (that anything could be in the file), for a finite group of files, not everything will be in the files. code: {\\([^{}]*\\|{[^{}]*}\\)*}
code: {\\([^{}]*\\|{\\([^{}]*\\|{\\([^{}]*\\|{\\([^{}]*\\|{[^{}]*}\\)*}\\)*}\\)*}\\)*}
|