Med OS2ai forsøger Aarhus Kommune og OS2-fællesskabet at give offentlige medarbejdere adgang til generativ AI uden at gøre kommunerne mere afhængige af amerikanske techgiganter.
function RensTekst(tekst as string) as string dim tmp as string for cnt=1 to len(tekst) if instr("abcdefghijklmnopqrstuvwxyzæåø01236456789 ",mid$(tekst,cnt,1)>0 then tmp=tmp & mid$(tekst,cnt,1) endif next RensTekst=tmp end function
Umiddelbart kan det følgende kunne anvendes ... her er hele movittenvassen, som du kan forsøge dig lidt frem og tilbage med :-)
GAa ------------------
using System;
using System.Text.RegularExpressions;
namespace TestRegExp { /// <summary> /// Summary description for Class1. /// </summary> class Class1 { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main(string[] args) { // // TODO: Add code to start application here //
Regex re = new Regex( "[a-z0-9 ]*" ); string teststreng = "0wqeu+ dajdasdaspoe+0qecøæåpå er e9 "; string res = "";
MatchCollection m = re.Matches( teststreng ); for (int i = 0; i< m.Count; ++i) { res = res + m[i].ToString(); }
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.