This is the talk page for discussing improvements to the Regular expression article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
Archives: 1, 2Auto-archiving period: 90 days |
This level-5 vital article is rated B-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||||||||||||||||||||||
|
Text and/or other creative content from this version of Regular expression examples was copied or moved into Regular expression with this edit on 22:28, 9 January 2012. The former page's history now serves to provide attribution for that content in the latter page, and it must not be deleted as long as the latter page exists. |
|
||
This page has archives. Sections older than 90 days may be automatically archived by Lowercase sigmabot III when more than 4 sections are present. |
The paragraph waits until the end to tell what normalization is, when it should be put in easy words at the beginning of the text.
I tried to understand the meaning of Normalization in the context of RegEx. But when I read the paragraph at Regular_expression#Unicode at the point Normalization it was telling me about Unicode and some Typewriter history just to end with the final words [...] is normalization.
Better writing style would be: Normalization means something something. And then go into examples and history lessons. GavriilaDmitriev (talk • they/them) 03:10, 24 April 2023 (UTC)
15. 12. 1983 this is the original one, but i want like this 15.12.1983 in AWB advanced setings in find box iam putting this one (\d{1,2}.\s\d{1,2}.\s\d{4}) and in replace putting this one(\d{1,2}.\d{1,2}.\d{4}) but It's not working.--Tmamatha (talk) 07:11, 22 June 2023 (UTC)
.
is a metacharacter, so needs to be escaped with a \
; try (\d{1,2}\.)\s+(\d{1,2}\.)\s+(\d{4})
For accessibility and WP:NPOV, perhaps "The quick brown fox jumps over the lazy dog" with the pattern [aeiou]+
. Looks like the current image was taken from https://regexr.com/.
If I understand correctly the current /h[aeiou]+/g
in the thumbnail is an ECMAScript convention1 but doesn't mention so, hence also in combination would drop the prefix /
and suffix /g
.
1 https://262.ecma-international.org/5.1/#sec-7.8.5 31.20.106.40 (talk) 11:47, 10 October 2023 (UTC)
(?<=\.) {2,}(?=[A-Z])
, I assume because the image came first (it's from the sentence spacing article) and the regexp was written to fit.[aeiou]+
does seem too simple, as in practice (assuming that we're keeping things simple and only using a single highlight colour) the output would be the same as for [aeiou]
. Belbury (talk) 17:18, 26 February 2024 (UTC)
/h[aeiou]+/g
seems fine for any of these. - Jochen Burghardt (talk) 17:12, 27 February 2024 (UTC)
/r[aeiouy]+/
to get a more interesting image; if considering "y" as a vowel is a problem, let me know; I can remove it from the pattern. - Jochen Burghardt (talk) 19:12, 12 March 2024 (UTC)
/r[aeiouy]+/g
which finds all occurrences of the letter r followed by one or more vowels or the letter y.Romans
isn't highlighted in the example. Not sure if it would be better to update the image and include an /i
option in the caption, or update the caption to a lower case r followed by one or more lower-case ...Belbury (talk) 13:50, 13 March 2024 (UTC)
/g
(which seems unavoidable) and /i
. An alternative could be /[Rr][aeiou]/g
, which is unnecessary complicated, however (exemplifying []
just once is sufficient). - Jochen Burghardt (talk) 14:47, 14 March 2024 (UTC)The text on the main page says this: "Every regular expression can be written solely in terms of the Kleene star and set unions over finite words." I think concatenation is also needed; if you have only Kleene star and unions over finite sets of words, you cannot make {1} conc {0}* (sets of words starting with 1 followed by arbitrarily many zeroes). 137.132.217.132 (talk) 09:07, 12 March 2024 (UTC)