J
Jimi Hullegård
Hi
What is the easiest way to clean a text from everything that is unwanted?
Lets say I want
[abc {options}]
where the starting "[", the "abc" and the ending "]" are required, and the
{options} are optional, and can be any combination (and any order) of the
following:
height=n (that is, any number)
width=n{%} (that is, either a regular number, or a percentage)
color=#nnnnnn | color-name (that is, either a hexadecimal color code,
or one of a few predefined color
names)
and also, all options can be surrounded by ". All other text inside the
these tags should be removed
examples:
[abc bla bla] should become [abc]
[abc bla bla] should become [abc]
[abc bla bla] should become [abc]
[abc bla bla] should become [abc]
[abc bla bla] should become [abc]
[abc bla bla] should become [abc]
[abc bla bla] should become [abc]
What is the easiest way to clean a text from everything that is unwanted?
Lets say I want
[abc {options}]
where the starting "[", the "abc" and the ending "]" are required, and the
{options} are optional, and can be any combination (and any order) of the
following:
height=n (that is, any number)
width=n{%} (that is, either a regular number, or a percentage)
color=#nnnnnn | color-name (that is, either a hexadecimal color code,
or one of a few predefined color
names)
and also, all options can be surrounded by ". All other text inside the
these tags should be removed
examples:
[abc bla bla] should become [abc]
[abc bla bla] should become [abc]
[abc bla bla] should become [abc]
[abc bla bla] should become [abc]
[abc bla bla] should become [abc]
[abc bla bla] should become [abc]
[abc bla bla] should become [abc]