From 8c54a9d2453039a2d9eeb37a3177c7bdb4c0cd98 Mon Sep 17 00:00:00 2001 From: Shreyas Minocha Date: Sun, 10 May 2020 19:09:06 +0530 Subject: [PATCH] Add more advanced examples --- chapters/advanced-examples.mdx | 71 +++++++++++++++++++++++++------- src/components/example/index.css | 2 +- 2 files changed, 56 insertions(+), 17 deletions(-) diff --git a/chapters/advanced-examples.mdx b/chapters/advanced-examples.mdx index bd8b9e4..0985f67 100644 --- a/chapters/advanced-examples.mdx +++ b/chapters/advanced-examples.mdx @@ -21,22 +21,6 @@ title: Advanced Examples
  • 32:32
  • -### IP Addresses - - -
  • 9.9.9.9
  • -
  • 127.0.0.1:8080
  • -
  • It's 192.168.1.9
  • -
  • 255.193.09.243
  • -
  • 123.123.123.123
  • -
  • 123.123.123.256
  • -
  • 0.0.x.0
  • -
    - ## Meta /gm}> @@ -49,6 +33,8 @@ title: Advanced Examples **Replace**: `` +I performed this operation in commit [`d7a684f`](https://github.com/shreyasminocha/regex-for-regular-folk/commit/4591c59cc347481a48fa5cc34c09f4f75c491d77). + ## Floating point numbers - optional sign @@ -75,6 +61,59 @@ title: Advanced Examples The positive lookahead `(?=\.\d|\d)` ensures that the regex does not match `.`. +## Latitude and Longitude + + +
  • 30.0260736, -89.9766792
  • +
  • 45, 180
  • +
  • -90.000, -180.0
  • +
  • 48.858093,2.294694
  • +
  • -3.14, 3.14
  • +
  • 045, 180.0
  • +
  • {"0, 0"}
  • +
  • -90., -180.
  • +
  • .004, .15
  • +
    + +See also: [Floating Point Numbers](#floating-point-numbers) + +## MAC Addresses + + +
  • 01:02:03:04:ab:cd
  • +
  • 9E:39:23:85:D8:C2
  • +
  • 00:00:00:00:00:00
  • +
  • 1N:VA:L1:DA:DD:R5
  • +
  • 9:3:23:85:D8:C2
  • +
  • ac::23:85:D8:C2
  • +
    + +## UUID + + +
  • 123e4567-e89b-12d3-a456-426655440000
  • +
  • c73bcdcc-2669-4bf6-81d3-e4ae73fb11fd
  • +
  • C73BCDCC-2669-4Bf6-81d3-E4AE73FB11FD
  • +
  • c73bcdcc-2669-4bf6-81d3-e4an73fb11fd
  • +
  • c73bcdcc26694bf681d3e4ae73fb11fd
  • +
    + +## IP Addresses + + +
  • 9.9.9.9
  • +
  • 127.0.0.1:8080
  • +
  • It's 192.168.1.9
  • +
  • 255.193.09.243
  • +
  • 123.123.123.123
  • +
  • 123.123.123.256
  • +
  • 0.0.x.0
  • +
    + ## HSL colours ### Integers from `0` to `360` diff --git a/src/components/example/index.css b/src/components/example/index.css index bb9fdc9..8c50a05 100644 --- a/src/components/example/index.css +++ b/src/components/example/index.css @@ -57,6 +57,7 @@ .example ul li ol li { font-size: large; letter-spacing: normal; + white-space: pre-wrap; } .example .indicator { @@ -108,6 +109,5 @@ color: transparent; position: absolute; left: 0; - white-space: pre; user-select: none; }