Reputation: 22820
OK, so basically I'm trying to parse a rather simple Wikipedia template.
Let's say we have :
{{ unbulleted list | item 1 | item 2 | li_style=font-size:88%; }}
(hint: spacing can be quite flexible, e.g. unbulleted list|...
is also possible)
So, you can see that after unbulleted list
, we have several instances of | something
.
What I want to match is all of those instance that do not contain =
.
How can this be achieved?
This is my current regex (but it's not working...) : http://regexr.com?384sk
{{unbulleted list(.+?)?(\|[^=]+)+
UPDATE:
Well, I think I'm rather close to solving the... riddle...
\|([^=\|}\r]+)(?=[\|}])
Upvotes: 2
Views: 92
Reputation: 43033
What about this regex ?
(?<=\|)\s*([^|={}]+)\s*(?=\||}})
Upvotes: 2