I'm trying to find out IPv6 address from a string. I've done this on IPv4 part by using re.findall(re.compile('\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'),addr). How can I modify this to IPv6?   Here's my string:  addr = "......IP address is 2001:0000:3238:DFE1:63::FEFB. SUbnet mask is.........."   Any help is appreciated. :)
I'm having trouble writing a regular expression that matches valid IPv6 addresses, including those in their compressed form (with :: or leading zeros omitted from each byte pair).    Can someone suggest a regular expression that would fulfill the requirement?  I'm considering expanding each byte pair and matching the result with a simpler regex.
find a $\int_{x}^{g(x)} f(t)\,dt = 1$ Let $f : [0, 2] → \mathbb{R}$ be a continuous, positive function and  $$\int_{0}^1 f(x)\,dx = \int_{1}^2 f(x)\,dx= 1$$ For each $x \in [0, 1]$, prove that there exists a unique function $g(x) \in [1, 2]$ such that $$\int_{x}^{g(x)} f(t)\,dt = 1$$ and $g \in C^1$. Well, I think in $g(x) = x +1$, but I'm not sure. Any hint is appreciated.  Thank you. bound on the cardinality of the continuum? I hope not Suppose we don't believe the continuum hypothesis. Using Von Neumann cardinal  assignment (so I guess we believe well-ordering?), is there any "familiar" ordinal number $\alpha$ such that, for non-tautological reasons, $\aleph_\alpha$ is provably larger than the cardinality of the continuum? I would hope not since it would seem pretty silly if something like $\alpha = \omega_0$ worked and we could say "well gee we can't prove that $c = \aleph_1$, but it's definitely one of $\aleph_1, \aleph_2, \ldots , \aleph_{73}, \ldots$". I (obviously) don't know jack squat about set theory, so this is really just idle curiosity. If a more precise question is desired I guess I would have to make it     For any countable ordinal $\alpha$ is the statement: $c &lt; \aleph_\alpha$ independent of ZFC in the same sense as the continuum hypothesis?   assuming that even makes sense. Thanks! Script failing with "command not found: ^M" When I try to run the following script in zsh, via the command /bin/zsh ~/.set_color_scheme.sh I get the following error:  command not found: ^M   The script has u+x permissions and it used to work on another machine that also had zsh. Any clues why?   Note: This question is related to  (where I am trying to adapt the script for tcsh)  #!/bin/zsh # Contents of set_color_scheme.sh  export LS_COLORS=$( \ ( grep '\w' | grep -v '^#' | sed 's/#.\+//' | perl -lane 'printf "%s=%s:", shift @F, join ";", @F;' ) &lt;&lt;&lt; "  # HUMAN_FORMATTED_DATA # list one per line  # these are basic filesystem items no 00          # normal fi 00          # file di 01 34       # directory ln 00 36       # link pi 40 33       # pipe so 00 35       # bd 40 33 01 cd 40 33 01 or 01 05 37 41 mi 01 05 37 41 ex 00 91       # executable ow 01 34       # other writables   *.cmd 00 32 *.exe 00 32  # archive, compressed things etc *.gz  00 90 *.bz2 00 90 *.bz  00 90 *.tz  00 90 *.rpm 00 90 *.rar 00 90 *.zip 00 90 *.iso 00 90   *.cpio 00 31    # perl &amp; CODE *.c      33 *.h      33 *.sh     33 *.t      33 *.pm     33 *.pl     33 *.cgi    33 *.pod    33 *.PL     33 *.js     33 *.php    33 #*.xs  # strikethrough *.off 00 9 *.bak 00 9 *.old 00 9   # documents misc, html webstuff # really TEXT *.htm    94 *.html   94 *.txt    94 *.text   94 *.css    94   # MOVIE *.avi    96 *.wmv    96 *.mpeg   96 *.mpg    96 *.mov    96 *.AVI    96 *.WMV    96 *.mkv    96  # images &amp; pdf *.jpg    96 *.jpeg   96 *.png    96 *.xcf    96 *.JPG    96 *.gif    96 *.svg    96 *.eps 00 96 *.pdf 00 96 *.PDF 00 96 *.ps  00 96  *.ai  00 91 # adobe ill *.doc 00 91 # msword   # data, such as .db, .csv *.csv    95 *.dsv    95 *.db     95 *.sql    95 *.meta   95 # CONFS *.xml    95 *.yaml   95 *.yml    95 *.conf   95 # [a-z0-9]*rc ") Is GNU's Java Compiler (GCJ) dead? Why are SO participants so unfriendly? New installation – TeX editor says: "Error: Could not start the command" I just downloaded and installed Texmaker. I've never used any (La)TeX before.  When I click the Run button with an arrow next to "Quick build" I get an error saying "Could not start the command". Why? What do I need to do? How to reset Kali linux root password java.sql.SQLException Parameter index out of range (1 > number of parameters, which is 0) How does the two slit experiment work? Whilst going through 'A brief history of time', I faced difficulty in understanding the . How can an individual electron cause fringes on screen? I was unable to understand it? Please explain it simply. Where is the precmd command in android? I'm kind of used to linux. I'm using Busybox from the Busybox Free installer, with Busybox 1.21.0-Stericson. Trying to chance my shell to the Busybox shell using busybox ash gives the following error after every single command:  ash: precmd: not found echo $PS1 $(precmd)$USER@$HOSTNAME:${PWD: -?} $    I tried to go back to the normal shell and find out WHERE precmd is:  which precmd   It just changes the prompt to have "1|" in front of it, without giving me WHERE it is. I found a solution , but have no idea where to put it. I'm basically trying to do the same as  (make Busybox shell the default). What is the difference between String.Empty and "" (empty string)? What is a word for deliberate dismissal of some facts? Why do PBX systems use -48 V? It seems common that PBX and other telephone hardware use a positive-ground power supply, where the "hot" line is at -48v.  What's the reason for that? Why was Sam Wilson chosen for this, but not Bucky? At the end of the Avengers: Endgame movie,      old Steve Rogers passed down his mantle of Captain America   to Sam Wilson.  Why didn't he choose Bucky for this? Bucky seems more fit for the job as he is a super soldier. Why "What's up"? Why's &quot;what's up&quot; used as greeting among young people? It sounds like asking &quot;what is up there&quot;?  A: What's up? B: The sky. How to include time factor in a mixed model (investigating the interaction between two factors and time)? Strange difference between pwd and /bin/pwd I added a symlink to the current directory with ln -s . aa. If I execute cd aa, and after that I executed pwd, the response is /home/sim/aa.  But if I execute /bin/pwd it prints /home/sim (the current directory hasn't changed).  Where does this difference come from? How do ideal quotients behave with respect to localization? Suppose $R$ is commutative ring with unity. For ideals $I$, $J \subseteq R$, the ideal quotient $(J:I)$ is $$(J:I) := \{x\in R \, : \, xI \subseteq J\}$$ Let $S\subset R$ be a multiplicative set. When does localization at $S$ commute with taking quotients, i.e. when does the equality $$(S^{-1} J : S^{-1} I) = S^{-1} (J:I)$$ hold? More generally, when is it true that $$S^{-1} \text{Ann}_{R} (M) = \text{Ann}_{S^{-1} R} (S^{-1} M)$$ for an $R$-module $M$? If a tag wiki becomes inaccessible due to a tag being eliminated, is the data destroyed? Or would it be able to be recovered by just recreating the tag?  On Gaming we had one tag for a particularly difficult case that a wiki entry was written for. There has been some debate as to what we should keep the tag as, which has led to the only instance of the tag being renamed a few times and eventually left on a new tag. The nightly script eventually cleaned out the original tag, and the wiki is inaccessible. So would I be able to retrieve this by reverting to the original tag, or is a rewrite of the wiki necessary? Polynomial rings in infinitely indeterminants How can we prove that (the set of all polynomials in infinitely non commutative indeterminants over $k$) is a ring, where $k$ is a ring with unity?   Adding two polynomials is a polynomial, but for commutativity  How can we show the following: $ax_1+bx_2=bx_2+ax_1$ (commutativity of addition) If we have finite number of variable it is easy to prove it, (we take the $n-1$ variables...), but what about the infinite number of variables?  Can someone give me a hint?