[Gambas-user] Regular expressions
Gianluigi
bagonergi at gmail.com
Fri Dec 31 14:24:47 CET 2021
Il giorno ven 31 dic 2021 alle ore 07:00 T Lee Davidson <
t.lee.davidson at gmail.com> ha scritto:
>
> Your first solution could make replacements where none should be made.
> Consider the output if the text is set thusly:
> Dim sLine As String = "The //installation// of a __SSH server__ on the
> remote __computer is worthwhile in any case!"
>
> Hmm, someone made a typo? So all the words from "computer" to the next
> markup tag will be underlined?
>
> Using regular expressions helps to guarantee that, when markup is
> replaced, it is done so because there is a matching markup tag
> bracketing the enclosed text.
>
> Now I am unsure what you mean by, "get control over replace when needed."
> Are you referring to Replace() or RegExp.Replace()?
>
> And, exactly what control do you think might be needed? Are you talking
> about greedy vs non-greedy (or "frugal" as Tobi puts it)?
>
>
> --
> Lee
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
Hi Lee,
sorry for the delay in the reply, but I'm looking for Postgres with Gambas
;-D
I thank you very much for your reply, you (with Tobias) have opened a new
world and you gave me to study :-)
Regards
Gianluigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20211231/9e1c5564/attachment.htm>
More information about the User
mailing list