How to convert [b]xxx[/b]to <strong>xxx</strong>using VB.NET Regex.Replace ()?
[b]xxx[/b]
<strong>xxx</strong>
Thank.
Just use the BBCode parser that someone else wrote. It is safer and more reliable.
Regex.Replace("\[b\](.*?)\[\/b\]", "<strong>$1</strong>") would do it
Regex.Replace("\[b\](.*?)\[\/b\]", "<strong>$1</strong>")
However, you do not need a regex:
"[b]xxx[/b]".Replace("[b]","<strong>").Replace("[/b]","</strong>")
Source: https://habr.com/ru/post/1772857/More articles:setting / changing rail configuration values after initialization - ruby-on-railsHow to match strings in a DB2 query (z / OS)? - db2T-SQL. How to select Item [i] and Item [i-1] on the same line WITHOUT the cursor - sqlRead an XML file like python lxml with c #? - pythonJavascript function execution from asp.net codebehind? - javascriptЯрлык для кнопки "Заменить" в диалоговом окне "Найти и заменить" - visual-studioX11 Программирование: получать уведомление, если появилось новое окно? - cLists of styles with natural behavior - cssIs there a system enumeration in .Net for CSS media types? - enumsCan I use the Android SDK without using eclipse? - androidAll Articles