S
Sunny
Hi,
I know that this is not the very right group, but I can not find better,
and I have seen a lot of regex experts to answer, so I'll give a shot:
Lets have this string:
"<table name='xxx'><br>\nMY_TEXT\n<\table><p>"
please note the new line characters.
So, using a regex like:
"</?table.*>"
will find these:
"<table name='xxx'><br>" and
"<\table><p>"
How should like a regex to get only the table tags? I want to leave <br>
and <p> unmatched? How to stop the match to the first occurrence of ">",
not the last one?
I.e. if I replace the match with an empty string, I want to receive:
"<br>\nMY_TEXT\n<p>",
but not what I have now:
"\nMY_TEXT\n"
Cheers
Sunny
I know that this is not the very right group, but I can not find better,
and I have seen a lot of regex experts to answer, so I'll give a shot:
Lets have this string:
"<table name='xxx'><br>\nMY_TEXT\n<\table><p>"
please note the new line characters.
So, using a regex like:
"</?table.*>"
will find these:
"<table name='xxx'><br>" and
"<\table><p>"
How should like a regex to get only the table tags? I want to leave <br>
and <p> unmatched? How to stop the match to the first occurrence of ">",
not the last one?
I.e. if I replace the match with an empty string, I want to receive:
"<br>\nMY_TEXT\n<p>",
but not what I have now:
"\nMY_TEXT\n"
Cheers
Sunny