I need a regular expression to substitute pseudo html in .NET

Posted by netadictos on Stack Overflow See other posts from Stack Overflow or by netadictos
Published on 2010-04-09T07:53:39Z Indexed on 2010/04/09 8:03 UTC
Read the original article Hit count: 375

Filed under:
|
|

I have texts like this one:

this is a text in [lang lang="en" ]english[/lang] or a text in [lang lang="en" ]spanish[/lang]

I need to substitute them for:

this is a text in <span lang="en">english </span> or a text in <span lang="es">spanish</span>

I need a regular expression, not a simple replace. The languages in the lang tag can be whatever.

© Stack Overflow or respective owner

Related posts about .NET

Related posts about c#