Wikipedia barwiki https://bar.wikipedia.org/wiki/Wikipedia:Hoamseitn MediaWiki 1.46.0-wmf.26 first-letter Media Spezial Dischkrian Nutza Nutza Dischkrian Wikipedia Wikipedia Dischkrian Datei Datei Dischkrian MediaWiki MediaWiki Dischkrian Vorlog Vorlog Dischkrian Huif Huif Dischkrian Kategorie Kategorie Dischkrian Portal Portal Dischkrian Buach Buach Dischkrian Woat Woat Dischkrian Text Text Dischkrian Spruch Spruch Dischkrian Nochricht Nochricht Dischkrian TimedText TimedText talk Modul Modul Diskussion Veranstaltung Veranstaltung Diskussion Loigom 0 6140 852806 762962 2026-05-01T08:14:26Z ~2026-26564-75 80309 852806 wikitext text/x-wiki {{Dialekt-oben|Südbairisch|Pinzgauarisch|Sort=Österreich}} {{Infobox Ort in Österreich (Südmittelbairisch) |Art = Gmoah |Name = Lóigom |AndereNamen = Leógóng |Wappen = Wappen at leogang.png |lat_deg = 47 | lat_min = 25 | lat_sec = 00 |lon_deg = 12 | lon_min = 45 | lon_sec = 00 |Bundesland = Soizburg |Bezirk = [[Pinzgau|Zej am See]] |Höhe = 788 |Fläche = 90.36 |Einwohner = 3249 |Stand = 2016-01-01 |PLZ = 5771 |Vorwahl = 06583 |Kfz = ZE |Gemeindekennziffer = 50 609 |NUTS = AT322 |Adresse = Leogang Nr. 4<br />5771 Leogang |Website = [http://www.leogang.at www.leogang.at] |Bürgermeister = Josef Grießner<ref name="offiziell">[http://www.leogang.at/system/web/person.aspx?typ=bgm&menuonr=218554241 leogang.at], offizielle Website. Abgerufen am 10. April 2014.</ref> |Bürgermeistertitel = Bürgermeister |Partei = [[ÖVP]] |Gemeinderatanzahl = 19 |Gemeinderat = {{Sitzverteilung | Legende = ja | Beschriftung = Sitze | Sitze = 19 | Land = AT | Breite = 0.7 |ÖVP|SPÖ|FPÖ | ÖVP = 11 | SPÖ = 7 | FPÖ = 1 }} |Wahljahr = 2019 |Bild1 = Leoganger Steinberge (Asitz).JPG |Bildbeschreibung1 = Lóigomer Stoahberg }} '''Lóigom''' (iwerregiónoi: ''Leógóng'' ómtlich: ''Leogang'') is a [[Gmoa]]h an [[Salzburg (Bundesland)|Bundesland Salzburg]] im [[Bezirk Zell am See|Zej am See (Pinzgau)]] in [[Österreich|Ésterreich]] mid 3.600 Eihwóner (2026). == Geógraafie == Dia Gmoah lieg im [[Pinzgau]] zwischen dé [[Leoganger Steinberge|Lóigomer Stoahberng]], deana eah heechster Gipfi as [[Birnhorn|Birnherndl]] (2634&nbsp;[[Meter über Adria|M. ü. A.]]) is, im Noan und dé [[Kitzbüheler Alpen|Kitzbichier Oipm]] an Sien. Ortstói sand: Berg, Ecking, Griassen, Hianreit, Hitten, Lóigom Dorf, Madreit, Otting, Pischzbichi, Roah, Rósentoi, Schwoschzlói, Sinning, Suhberg, Suhroah, Ullachgráum. == Gschicht == D' Lóigom is schóh [[928]] ois ''Liuganga'' urkundlich gnennt woon. D' Lóigom is oane voh dia oitesten Bergbaustéttner vah Soizburg. == Bólitik == [[Buagamoasta|Buagermoaster]] is da Griassner Sepp (Grießner Josef) voh da [[ÖVP]]. == Sejchenweeschts == === Museen === * Bergbaumuseum Leogang an Dorf Hitten * Schaubergwerk in Schwoschzlói * Kubin Kabinett Leogang an oiden „Boodheisl“ === Naturdénkmäler === * Birnbochlóoch * Griassner Móor == Sport == * Sportclub Leogang * Union Tennisclub Leogang == Gallarie == <gallery> Datei:AsitzBahn BergStation.JPG|Die Bergstation der Leoganger Gondelbahn im Sommer… Datei:Bergstation Asitzbahn Leogang (Winter).jpg|…und im Winter Datei:AsitzBahn BlickAufLeogang.JPG|Blick in Richtung Leogang von der Asitzbahn aus Datei:Talstation Asitzbahn Leogang.jpg|Die neue Leoganger Talstation im Winter 2006/07 </gallery> == Buamer und Mötzner vah da Gmoand == * [[Sylvia Eder|Sylvia]] und [[Elfi Eder]]. Skirennleifferinnen * [[Stefan Gimpl]], Snowboardfoarer, 3-facher Air&Style Gwinner == Im Netz == * [https://web.archive.org/web/20200307032723/http://www.schaubergwerk-leogang.com/ Schaubergwerk Lóigom] {{commons|Salzburger Land}} == Beleg == <references /> {{Navigationsleiste Ort im Pinzgau}} [[Kategorie:Gemeinde im Land Salzburg]] [[Kategorie:Ort im Bezirk Zell am See]] jjbtauzibu1izqtc7xuz8io0v06a6i5 Regex 0 112969 852805 848163 2026-05-01T01:24:24Z Mikhail Ryazanov 15510 JPEG → SVG 852805 wikitext text/x-wiki [[Datei:The river effect in justified text.svg|mini|S Suachagebnis griagd ma midn Regex {{sxhl|2=ragel|1=(?<=\.) {2,}(?=[A-Z])}} Zwoa Laazoachn miassn gfundn wean, owa nua wens noch an Punkt (.) afdredn und voa an groussn Buachstom.]] <span lang="bar" dir="ltr">A</span> '''Regex''' oda '''Regular Expression''' ([[boarisch]]: ''Regulära Ausdruck'') is a Sequenz vo Zoachn, wo a Suachmusta definiad. Regex wean in da Softwareentwicklung vawendd owa aa in Texteditorn, wo s zan Suacha und Dasetzn vo Zoachnkeedn vawendd wean. So konst in ana Wikipedia olle Weata aussasuacha, wo mit A oofanga und mid -bichl afhean. Do is wuascht, wejchane Zoachn dazwischn liegn. Sowos geht nua mid an Regex. D Syntax vo d Regex variiad a wengal zwischn vaschiednan Apps. == Praxis == === Oafoche Regex === {| valign="top" class="wikitable" ! Operator ! Effekt |- |'''.''' |Da Punktoperator driffd jeds Zoachn. |- valign="top" |[ ] |A Box (''Kostn'') dameglicht s Findn vo oanzlna Zoachn in an Text oda in ana Zoachnkeedn. |- valign="top" |[^ ] |A Complement Box (''Gengdoalskostn'') dameglicht, dass oanzlne Zoachn in an Text oda ana Zoachnkeedn ned gfundn wean. |- valign="top" |^ | A Caret Anchor (''Zoachnanka'') driffd en Ofang vo ana Zein (oda jeda Zein im Multiline Mode) |- valign="top" |$ |A Dollar Anchor(''Dollaranka'') driffd s End vo ana Zein (oda jeda Zein im Multiline Mode) |- valign="top" |( ) | Runde Klamman (''parentheses'') defininan an markiadn Untaausdruck (''marked subexpression''). Dea gfundaned Textowschnidd ko spada wieda owgruafa wean. |- valign="top" |\''n'' |''n'' is a Ziffa vo 1 to 9; driffd wos da ''n''te markiade Untaausdruck driffd. Den Operator gibts ned in da daweitadn Regex-Syntax. |- valign="top" |* |A oanzlns Zoachn gfoigt vo "*" driffd Nui oda meah Kopien vo dem Ausdruck. Beispuisweis, "ab*c" driffd "ac", "abc", "abbbc" etc. "[xyz]*" driffd "", "x", "y", "zx", "zyx", und so weida. * \''n''*, where ''n'' is a digit from 1 to 9, matches zero or more iterations of what the ''n''th marked subexpression matched. For example, "(a.)c\1*" matches "abcab" and "abcabab" but not "abcac". * A Ausdruck wo vo "\(" and "\)" eihgschlossn is, gfoigt vo an "*" guit ois invalid. |} ==== Beispui ==== * "^[MH]uad" ** Driffd ''Muad'' und ''Huad'' owa nua am Ofang vo ana Zein. * "[MH]uad$" ** Driffd ''Muad'' und ''Huad'' owa nua am End vo ana Zein. === Zoachnauswoi === {| class="wikitable" | <code>'''[egh]'''</code> | oans vo d Zoachn „e“, „g“ oder „h“ |- | <code>'''[0-6]'''</code> | a Ziffa vo „0“ bis „6“ (Bindestriich gem an Bereich oo) |- | <code>'''[A-Za-z0-9]'''</code> | a beliabiga lateinischa Buachstob oda a beliabige Ziffa |- | <code>'''[^a]'''</code> | a beliabigs Zoachn aussa „a“ („^“ voa ana Zoachnklass moant Negation) |- | <code>'''[-A-Z]'''</code>, <code>'''[A-Z-]'''</code> (bzw. <code>'''[A-Z\-a-z]'''</code>, owa ned noch POSIX) | D Auswoi enthoid aa en Bindestrich „-“ |} === Zoachnklassn === Es gibt Zoachnklassn, wo fiadefiniat san. Des wead owa ned in oin Implementiarunga glei untastitzt. Zoachnklassn san beispuisweis: {| class="wikitable" | <code>'''\d'''</code> || '''d'''igit || a Ziffa, oiso [0-9] (und evtl. aa no weidane Zoizoachn, wia Unicode usw.) |- | <code>'''\D'''</code> || no '''d'''igit || a Zoachn, wo koa Ziffa is, oiso [^\d] |- | <code>'''\w'''</code> || '''w'''ord character || a Buachstob, a Ziffa oda a Untastrich, oiso [a-zA-Z_0-9] (und evtl. aa no ned-lateinische Buachstom, z.&nbsp;B. Umlaut) |- | <code>'''\W'''</code> || no '''w'''ord character || a Zoachn, wo weda Buachstob Zoi no Untastrich is, oiso [^\w] |- | <code>'''\s'''</code> || white'''s'''pace || moast mindast s Laazoachn und d Klass vo d Steiazoachn \f, \n, \r, \t und \v |- | <code>'''\S'''</code> || no white'''s'''pace|| a Zoachn, wo koa Whitespace is, oiso [^\s] |} ==== Zoachnklassn noch POSIX-Standard ==== {| class="wikitable sortable" |- ! POSIX !! Ned-Standard !! Perl/Tcl !! Vim !! Java !! ASCII !! Bschrieb |- | |<syntaxhighlight lang="ragel" inline>[:ascii:]</syntaxhighlight><ref name="char-classes-emacs-list-2016"> {{cite web | title = 33.3.1.2 Character Classes — Emacs lisp manual — Version 25.1 | date = 2016 | work = gnu.org | url = https://www.gnu.org/software/emacs/manual/html_node/elisp/Char-Classes.html | access-date = 2017-04-13 }} </ref> | | | <syntaxhighlight lang="ragel" inline>\p{ASCII}</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>[\x00-\x7F]</syntaxhighlight> | ASCII characters (ASCII Zoachn) |- | <syntaxhighlight lang="ragel" inline>[:alnum:]</syntaxhighlight> | | | | <syntaxhighlight lang="ragel" inline>\p{Alnum}</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>[A-Za-z0-9]</syntaxhighlight> | Alphanumeric characters (alphanumerische Zoachn) |- | | <syntaxhighlight lang="ragel" inline>[:word:]</syntaxhighlight><ref name="char-classes-emacs-list-2016"/> | <syntaxhighlight lang="ragel" inline>\w</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>\w</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>\w</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>[A-Za-z0-9_]</syntaxhighlight> | Alphanumeric characters plus "_" (alphanum. Zoachn plus "_") |- | | | <syntaxhighlight lang="ragel" inline>\W</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>\W</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>\W</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>[^A-Za-z0-9_]</syntaxhighlight> | Non-word characters (Ned-Woat Zoachn) |- | <syntaxhighlight lang="ragel" inline>[:alpha:]</syntaxhighlight> | | | <syntaxhighlight lang="ragel" inline>\a</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>\p{Alpha}</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>[A-Za-z]</syntaxhighlight> | Alphabetic characters (Buachstom) |- | <syntaxhighlight lang="ragel" inline>[:blank:]</syntaxhighlight> | | | <syntaxhighlight lang="ragel" inline>\s</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>\p{Blank}</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>[ [[\t]]]</syntaxhighlight> | Space and tab (Laazoachn und Tabs) |- | | | <syntaxhighlight lang="ragel" inline>\b</syntaxhighlight> | <code>\&lt; \&gt;</code> | <syntaxhighlight lang="ragel" inline>\b</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>(?<=\W)(?=\w)|(?<=\w)(?=\W)</syntaxhighlight> | Word boundaries (Woatgrenzn) |- | | | | | <syntaxhighlight lang="ragel" inline>\B</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>(?<=\W)(?=\W)|(?<=\w)(?=\w)</syntaxhighlight> | Non-word boundaries (Ned-Woat-Grenzn) |- | <syntaxhighlight lang="ragel" inline>[:cntrl:]</syntaxhighlight> | | | | <syntaxhighlight lang="ragel" inline>\p{Cntrl}</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>[\x00-\x1F\x7F]</syntaxhighlight> | Control characters (Steiazoachn) |- | <syntaxhighlight lang="ragel" inline>[:digit:]</syntaxhighlight> | | <syntaxhighlight lang="ragel" inline>\d</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>\d</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>\p{Digit}</syntaxhighlight> or <syntaxhighlight lang="ragel" inline>\d</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>[0-9]</syntaxhighlight> | Digits (Ziffan) |- | | | <syntaxhighlight lang="ragel" inline>\D</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>\D</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>\D</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>[^0-9]</syntaxhighlight> | Non-digits (Ned-Ziffan) |- | <syntaxhighlight lang="ragel" inline>[:graph:]</syntaxhighlight> | | | | <syntaxhighlight lang="ragel" inline>\p{Graph}</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>[\x21-\x7E]</syntaxhighlight> | Visible characters (Sichtbore Zoachn) |- | <syntaxhighlight lang="ragel" inline>[:lower:]</syntaxhighlight> | | | <syntaxhighlight lang="ragel" inline>\l</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>\p{Lower}</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>[a-z]</syntaxhighlight> | Lowercase letters (kloane Buachstom) |- | <syntaxhighlight lang="ragel" inline>[:print:]</syntaxhighlight> | | | <syntaxhighlight lang="ragel" inline>\p</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>\p{Print}</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>[\x20-\x7E]</syntaxhighlight> | Visible characters and the space character (Sichtbore Zoachn & Laazoachn) |- | <syntaxhighlight lang="ragel" inline>[:punct:]</syntaxhighlight> | | | | <syntaxhighlight lang="ragel" inline>\p{Punct}</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>[][!"#$%&'()*+,./:;<=>?@\^_`{|}~-]</syntaxhighlight> | Punctuation characters (Zoachnsetzung bzw. Interpunktion) |- | <syntaxhighlight lang="ragel" inline>[:space:]</syntaxhighlight> | | <syntaxhighlight lang="ragel" inline>\s</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>\_s</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>\p{Space}</syntaxhighlight> or <syntaxhighlight lang="ragel" inline>\s</syntaxhighlight> | <code>[ [[/t|\t]][[/r|\r]][[/n|\n]][[/v|\v]][[/f|\f]]]</code> | Whitespace characters (Laazoachn) |- | | | <syntaxhighlight lang="ragel" inline>\S</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>\S</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>\S</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>[^ \t\r\n\v\f]</syntaxhighlight> | Non-whitespace characters (Ned-Laazoachn) |- | <syntaxhighlight lang="ragel" inline>[:upper:]</syntaxhighlight> | | | <syntaxhighlight lang="ragel" inline>\u</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>\p{Upper}</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>[A-Z]</syntaxhighlight> | Uppercase letters (grousse Buachstom) |- | <syntaxhighlight lang="ragel" inline>[:xdigit:]</syntaxhighlight> | | | <syntaxhighlight lang="ragel" inline>\x</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>\p{XDigit}</syntaxhighlight> | <syntaxhighlight lang="ragel" inline>[A-Fa-f0-9]</syntaxhighlight> | Hexadecimal digits (hexadezimale Zoachn) |} === Quantifier === Quantifier (''Quantifiziara'' oda ''Wiedahoifaktorn'') legn fest, wia oft a Ausdruck, oiso a vurigs Zoachn bzw. a vurige Zoachnkeedn zuaglossn is. {| class="wikitable" |- | <code>'''?'''</code> || Da vurige Ausdruck is optionai, ea ko fiakema, braucht owa ned. Des hoasst, da Ausdruck kimmt nui- oda oamoi fia. (Des entspricht <code>'''{''0'',''1''}'''</code>) |- | <code>'''+'''</code> || Da vurige Ausdruck muass mindastns oamoi fiakema, deaf owa aa efta fiakema. (Des is aa <code>'''{''1'',}'''</code>) |- | <code>'''*'''</code> || Da vurige Ausdruck deaf beliabi oft (aa koamoi) fiakema. (Des is aa <code>'''{''0'',}'''</code>) |- | <code>'''{<span style="color:darkgreen;">''n''</span>}'''</code> || Da vurige Ausdruck muass exakt ''n''-moi fiakema. (Des is aa <code>'''{''n'',''n''}'''</code>) |- | <code>'''{<span style="color:darkgreen;">''min''</span>,}'''</code> || Da vurige Ausdruck muass mindastens ''min''-moi fiakema. |- | <code>'''{<span style="color:darkgreen;">''min''</span>,<span style="color:darkgreen;">''max''</span>}'''</code> || Da vurige Ausdruck muass mindastens ''min''-moi und deaf maximai ''max''-moi fiakema. |- | <code>'''{0,<span style="color:darkgreen;">''max''</span>}'''</code> || Da vurige Ausdruck deaf maximai ''max''-moi fiakema. |} ==== Beispui ==== * <code>a+</code> is „a“ owa aa „aaaa“ * <code>[0-9]+</code> is „0123456789“ owa aa „072345“ * <code>[ab]+</code> is „a“, „b“, „aa“, „bbaab“ usw. * <code>[0-9]{2,5}</code> is mindastns zwoa und maximai 5 Ziffan, z. B. „91“ oder „63091“ === Praktische Beispui === {| class="wikitable" ! Operator ! width=40% | Bschrieb ! Beispui |- ! <code>.</code> | Driffd normai jeds Zoachn auss a neie Zein. <br/>In eckadn Klamman is da Punkt weatle gmoant. | <syntaxhighlight lang="perl"> $string1 = "Hello World\n"; if ($string1 =~ m/...../) { print "$string1 has length >= 5.\n"; } </syntaxhighlight> '''Output:''' <syntaxhighlight lang="text"> Hello World has length >= 5. </syntaxhighlight> |- ! <code>( )</code> | Grupiad Zoachn za oan Element. <br/>Wen a Ausdruck in rundn Klamman gfunden wead, ko spada duach <code>$1</code>, <code>$2</code>, ... draf zuagriffa wean. | <syntaxhighlight lang="perl"> $string1 = "Hello World\n"; if ($string1 =~ m/(H..).(o..)/) { print "We matched '$1' and '$2'.\n"; } </syntaxhighlight> '''Output:''' <syntaxhighlight lang="text"> We matched 'Hel' and 'o W'. </syntaxhighlight> |- ! <code>+</code> | Driffd as voaherige Zoachn oamoi oda meahmois. | <syntaxhighlight lang="perl"> $string1 = "Hello World\n"; if ($string1 =~ m/l+/) { print "There are one or more consecutive letter \"l\"'s in $string1.\n"; } </syntaxhighlight> '''Output:''' <syntaxhighlight lang="text"> There are one or more consecutive letter "l"'s in Hello World. </syntaxhighlight> |- ! <code>?</code> | Driffd as voaherige Zoachn nuimoi oda oamoi. | <syntaxhighlight lang="perl"> $string1 = "Hello World\n"; if ($string1 =~ m/H.?e/) { print "There is an 'H' and a 'e' separated by "; print "0-1 characters (e.g., He Hue Hee).\n"; } </syntaxhighlight> '''Output:''' <syntaxhighlight lang="text"> There is an 'H' and a 'e' separated by 0-1 characters (e.g., He Hue Hee). </syntaxhighlight> |- ! <code>?</code> | Modifiziad an <code>*</code>, <code>+</code>, <code>?</code> or <code>{M,N}</code> Regex, wo voahea kimmt, so dass a meglichst sejtn gfundn wead (non-greedy match). | <syntaxhighlight lang="perl"> $string1 = "Hello World\n"; if ($string1 =~ m/(l.+?o)/) { print "The non-greedy match with 'l' followed by one or\n"; print "more characters is 'llo' rather than 'llo Wo'.\n"; } </syntaxhighlight> '''Output:''' <syntaxhighlight lang="text"> The non-greedy match with 'l' followed by one or more characters is 'llo' rather than 'llo Wo'. </syntaxhighlight> |- ! <code>*</code> | Driffd as voaherige Zoachn nuimoi oda meahmois. | <syntaxhighlight lang="perl"> $string1 = "Hello World\n"; if ($string1 =~ m/el*o/) { print "There is an 'e' followed by zero to many "; print "'l' followed by 'o' (e.g., eo, elo, ello, elllo).\n"; } </syntaxhighlight> '''Output:''' <syntaxhighlight lang="text"> There is an 'e' followed by zero to many 'l' followed by 'o' (e.g., eo, elo, ello, elllo). </syntaxhighlight> |- ! <code>{M,N}</code> | Definiad a Minimum M und a Maximum N vo Zoachn-Iwaeihstimmunga (match count).<br/>N ko ausglossn wean und M ko 0 sei: <code>{M}</code> driffd "genau" M moi; <code>{M,}</code> driffd "zmindast" M moi; <code>{0,N}</code> driffd "hextns" N moi.<br/><code>x* y+ z?</code> is so equivalent za <code>x{0,} y{1,} z{0,1}</code>. | <syntaxhighlight lang="perl"> $string1 = "Hello World\n"; if ($string1 =~ m/l{1,2}/) { print "There exists a substring with at least 1 "; print "and at most 2 l's in $string1\n"; } </syntaxhighlight> '''Output:''' <syntaxhighlight lang="text"> There exists a substring with at least 1 and at most 2 l's in Hello World </syntaxhighlight> |- ! <code>[…]</code> | Definiad a Reih vo meglichn Zoachn-Iwaeihstimmunga. | <syntaxhighlight lang="perl"> $string1 = "Hello World\n"; if ($string1 =~ m/[aeiou]+/) { print "$string1 contains one or more vowels.\n"; } </syntaxhighlight> '''Output:''' <syntaxhighlight lang="text"> Hello World contains one or more vowels. </syntaxhighlight> |- ! <code><nowiki>|</nowiki></code> | Separiad oitanative Meglikeidn. | <syntaxhighlight lang="perl"> $string1 = "Hello World\n"; if ($string1 =~ m/(Hello|Hi|Pogo)/) { print "$string1 contains at least one of Hello, Hi, or Pogo."; } </syntaxhighlight> '''Output:''' <syntaxhighlight lang="text"> Hello World contains at least one of Hello, Hi, or Pogo. </syntaxhighlight> |- ! <code>\b</code> | Driffd a Nuibroadngrenz (''zero-width boundary'') zwischn am Zoachn vo da Woatklass (schaug untn) und entweda am Zoachn vo da Ned-Woatklass oder ana Kantn; säim wia <code>(^\w|\w$|\W\w|\w\W)</code>. | <syntaxhighlight lang="perl"> $string1 = "Hello World\n"; if ($string1 =~ m/llo\b/) { print "There is a word that ends with 'llo'.\n"; } </syntaxhighlight> '''Output:''' <syntaxhighlight lang="text"> There is a word that ends with 'llo'. </syntaxhighlight> |- ! <code>\w</code> | Driffd a alphanumerisches Zoachn, eihschliassle "_"; <br/>säim wia <code>[A-Za-z0-9_]</code> in ASCII, und : <code>[\p{Alphabetic}<wbr/>\p{GC=Mark}<wbr/>\p{GC=Decimal_Number}<wbr/>\p{GC=Connector_Punctuation}]</code> in Unicode, wo <code>Alphabetic</code> mehra ois wia lateinische Buachstom moant und <code>Decimal_Number</code> mehra ois wia arabische Ziffan moant. | <syntaxhighlight lang="perl"> $string1 = "Hello World\n"; if ($string1 =~ m/\w/) { print "There is at least one alphanumeric "; print "character in $string1 (A-Z, a-z, 0-9, _).\n"; } </syntaxhighlight> '''Output:''' <syntaxhighlight lang="text"> There is at least one alphanumeric character in Hello World (A-Z, a-z, 0-9, _). </syntaxhighlight> |- ! <code>\W</code> | Driffd a '''ned'''-alphanumerisches Zoachn, ausschliassle "_"; <br/>same as <code>[^A-Za-z0-9_]</code> in ASCII, und :<code>[^\p{Alphabetic}<wbr/>\p{GC=Mark}<wbr/>\p{GC=Decimal_Number}<wbr/>\p{GC=Connector_Punctuation}]</code> in Unicode. | <syntaxhighlight lang="perl"> $string1 = "Hello World\n"; if ($string1 =~ m/\W/) { print "The space between Hello and "; print "World is not alphanumeric.\n"; } </syntaxhighlight> '''Output:''' <syntaxhighlight lang="text"> The space between Hello and World is not alphanumeric. </syntaxhighlight> |- ! <code>\s</code> | Driffd a Laazoachn, <br/>wo in ASCII a Tab(ulator), a Zeinfiaschub, a Seitnfiaschub, Wognrucklaf und a Laazoachn san; in Unicode stimmts aa mid Laazoachn ohne Untabrechung, vo da naxtn Zein und dena Laazoachn mid variabla Broadn (unta andam) iwaeih. | <syntaxhighlight lang="perl"> $string1 = "Hello World\n"; if ($string1 =~ m/\s.*\s/) { print "In $string1 there are TWO whitespace characters, which may"; print " be separated by other characters.\n"; } </syntaxhighlight> '''Output:''' <syntaxhighlight lang="text"> In Hello World there are TWO whitespace characters, which may be separated by other characters. </syntaxhighlight> |- ! <code>\S</code> | Driffd ois NUA KOA Laazoachn. | <syntaxhighlight lang="perl"> $string1 = "Hello World\n"; if ($string1 =~ m/\S.*\S/) { print "In $string1 there are TWO non-whitespace characters, which"; print " may be separated by other characters.\n"; } </syntaxhighlight> '''Output:''' <syntaxhighlight lang="text"> In Hello World there are TWO non-whitespace characters, which may be separated by other characters. </syntaxhighlight> |- ! <code>\d</code> | Driffd a Ziffa; <br/>säim ois wia <code>[0-9]</code> in ASCII; <br/>in Unicode, säim ois wia <code>\p{Digit}</code> or <code>\p{GC=Decimal_Number}</code>, wo a säim is ois wia <code>\p{Numeric_Type=Decimal}</code>. | <syntaxhighlight lang="perl"> $string1 = "99 bottles of beer on the wall."; if ($string1 =~ m/(\d+)/) { print "$1 is the first number in '$string1'\n"; } </syntaxhighlight> '''Output:''' <syntaxhighlight lang="text"> 99 is the first number in '99 bottles of beer on the wall.' </syntaxhighlight> |- ! <code>\D</code> | Drifft a Ned-Ziffa; <br/>säim ois wia <code>[^0-9]</code> in ASCII oda <code>\P{Digit}</code> in Unicode. | <syntaxhighlight lang="perl"> $string1 = "Hello World\n"; if ($string1 =~ m/\D/) { print "There is at least one character in $string1"; print " that is not a digit.\n"; } </syntaxhighlight> '''Output:''' <syntaxhighlight lang="text"> There is at least one character in Hello World that is not a digit. </syntaxhighlight> |- ! <code>^</code> | Matches the beginning of a line or string. | <syntaxhighlight lang="perl"> $string1 = "Hello World\n"; if ($string1 =~ m/^He/) { print "$string1 starts with the characters 'He'.\n"; } </syntaxhighlight> '''Output:''' <syntaxhighlight lang="text"> Hello World starts with the characters 'He'. </syntaxhighlight> |- ! <code>$</code> | Matches the end of a line or string. | <syntaxhighlight lang="perl"> $string1 = "Hello World\n"; if ($string1 =~ m/rld$/) { print "$string1 is a line or string "; print "that ends with 'rld'.\n"; } </syntaxhighlight> '''Output:''' <syntaxhighlight lang="text"> Hello World is a line or string that ends with 'rld'. </syntaxhighlight> |- ! <code>\A</code> | Matches the beginning of a string (but not an internal line). | <syntaxhighlight lang="perl"> $string1 = "Hello\nWorld\n"; if ($string1 =~ m/\AH/) { print "$string1 is a string "; print "that starts with 'H'.\n"; } </syntaxhighlight> '''Output:''' <syntaxhighlight lang="text"> Hello World is a string that starts with 'H'. </syntaxhighlight> |- ! <code>\z</code> | Matches the end of a string (but not an internal line).<ref name="Perl Best Practices">{{cite book | last = Conway | first = Damian | authorlink = | title = Perl Best Practices | chapter = Regular Expressions, End of String | publisher = O'Reilly | pages = 240 | url = https://www.scribd.com/doc/15491004/Perl-Best-Practices | year=2005 | isbn = 978-0-596-00173-5}}</ref> | <syntaxhighlight lang="perl"> $string1 = "Hello\nWorld\n"; if ($string1 =~ m/d\n\z/) { print "$string1 is a string "; print "that ends with 'd\\n'.\n"; } </syntaxhighlight> '''Output:''' <syntaxhighlight lang="text"> Hello World is a string that ends with 'd\n'. </syntaxhighlight> |- ! <code>[^…]</code> | Matches every character except the ones inside brackets. | <syntaxhighlight lang="perl"> $string1 = "Hello World\n"; if ($string1 =~ m/[^abc]/) { print "$string1 contains a character other than "; print "a, b, and c.\n"; } </syntaxhighlight> '''Output:''' <syntaxhighlight lang="text"> Hello World contains a character other than a, b, and c. </syntaxhighlight> |} == Beleg == <references /> == Im Netz == * [https://web.archive.org/web/20100605090856/http://www.lrz-muenchen.de/services/schulung/unterlagen/regul/ Reguläre Sprochn, reguläre Ausdrick] * [http://www.opengroup.org/onlinepubs/009695399/toc.htm POSIX specification of regular expressions] * [http://perldoc.perl.org/perlre.html Perl syntax for regular expressions] * [https://web.archive.org/web/20180829180926/http://www.regenechsen.de/phpwcms/index.php?regex_allg Regex-Kurs fia Ofenga] * [http://www.regular-expressions.info/ Regex guide] === Software === * [https://web.archive.org/web/20181214194816/https://www.debuggex.com/ Online visual regex tester] * [http://regex101.com/ Online regex tester] * [http://www.regexr.com/ Online regex tester] – Visualisiarung [[Kategorie:Programmierung]] [[Kategorie:Programmiersprachelement]] [[Kategorie:Formale Sprachen]] [[Kategorie:Theoretische Informatik]] c5o3s2z4pyxy14eo0eamdzdo326ide6