[Gambas-user] Regular expressions

Hans Lehmann hans at gambas-buch.de
Thu Dec 30 13:37:12 CET 2021


Hello.

I am looking for 3 regular pattern expressions that check in a DokuWiki 
text whether the formats `underlined`, `italic` or `bold` are in the 
given text.

Example text:

The //installation// of a **SSH server** on the remote __computer__ is 
worthwhile in any case!

My many attempts ended up with these patterns, which unfortunately do 
not work:

IF sLine Like "*[_]{2}*[_]{2}*" THEN sLine = Replace(sLine, "__", "<uuu>")
IF sLine Like "*[*]{2}*[*]{2}*" THEN sLine = Replace(sLine, "**", "<bbb>")
IF sLine Like "*[/]{2}*[/]{2}*" THEN sLine = Replace(sLine, "//", "<iii>")

Any hint in the right direction will be gladly read.

With kind regards

Hans


More information about the User mailing list