My question was marked as a duplicate so I've made a couple edits. As I said, I was able to find many similar questions when I searched but none were quite what I needed.  I am not validating a string where the only thing present will be the phone number (this seems to be what most of the other questions are addressing).  Rather, I am attempting to pull out all phone numbers (which will then be manually checked by the user) from a larger block of text.  The problem I am having is that my regular expression is matching zip codes with extensions (ex: 45202-4787), and I am not sure how to alter my regex to avoid that.  If this truly is a duplicate question then I apologize for not being able to find the existing one that deals with my issue.    My specifications for phone number format are:  1) -, ., and space as delimiters (and in any combination)  2) area code may appear with or without parentheses  A few examples:  (xxx) xxx-xxxx (xxx) xxx.xxxx xxx-xxx-xxxx xxx xxx-xxxx xxxxxxxxxxx   I am using Anirudh's regex from the comments:  (\(?\d{3}\)?)?[. -]?\d{3}[. -]?\d{4}   Again, my problem is that this regex matches zip codes with extensions (ex: 45202-4787).  I would be grateful for any help, as I'm very new to using regular expressions. Thanks!
I'm trying to put together a comprehensive regex to validate phone numbers. Ideally it would handle international formats, but it must handle US formats, including the following:   1-234-567-8901 1-234-567-8901 x1234 1-234-567-8901 ext1234 1 (234) 567-8901 1.234.567.8901 1/234/567/8901 12345678901   I'll answer with my current attempt, but I'm hoping somebody has something better and/or more elegant.
My father-in-law is a builder. He has put in 20 amp and 15 amp breakers, and ran 12-2 as the home runs to the switch's and the first plug to make them hot. He then ran 14-2 to feed the rest of the plugs, lights, and ceiling fans.   Is it okay that he used different gauge wires on the same circuit? Error : Warning: strpos() [function.strpos]: Offset not contained in string - can not find solution switch a theme different per user role I plan to use the member plugin by Justin Tadlock  I wish to know if how could I, on the front side, auto switch to a theme according to a role status.. for example authors would have the site presented using theme 1 while editor would have the site presenter using theme 2  I would rather have 2 different theme rather than conditionals within one theme structure  Thank you in advance Git command to show which specific files are ignored by .gitignore I am getting my feet wet with Git and have the following issue:  My project source tree:  / | +--src/ +----refs/ +----... | +--vendor/ +----...   I have code (currently MEF) in my vendor branch that I will compile there and then move the references into /src/refs which is where the project picks them up from.  My issue is that I have my .gitignore set to ignore *.dll and *.pdb.  I can do a git add -f bar.dll to force the addition of the ignored file which is ok, the problem is I can not figure out to list what files exist that are ignored.  I want to list the ignored files to make sure that I don't forget to add them.  I have read the man page on git ls-files and can not make it work. It seems to me that git ls-files --exclude-standard -i should do what I want.  What am I missing? Can't use Shortcut key on linux mint 19 XFCE Will metering from a DSLR apply to a film SLR? I still like to shoot with film (I use a Nikon F3) but I like the immediate feedback of digital.  I'm thinking of buying a used DSLR to help me get the framing and lighting right when I shoot static subjects.  Then I'd take the final shot with my F3. But would the metering be transferable?  If the shot looks perfect at 1/125 with f/2 on a DSLR, will the same settings work on a film camera? Why does Super User site appear twice in vote-to-close dialog? Super User appears in both the main Off-Topic list and the Migration list of the close dialog. Is this a bug or intentional?  I also don't really understand why Server Fault appears in the main Off-Topic list and not the Migration list, apart from it being new.  Here:    and: Why isn't an infinite, flat, nonexpanding universe filled with a uniform matter distribution a solution to Einstein's equation? Evaluate $\int_0^1 \frac{\log \left( 1+x^{2+\sqrt{3}}\right)}{1+x}\mathrm dx$ I am trying to find a closed form for  $$\int_0^1 \frac{\log \left( 1+x^{2+\sqrt{3}}\right)}{1+x}\mathrm dx = 0.094561677526995723016 \cdots$$  It seems that the answer is $$\frac{\pi^2}{12}\left( 1-\sqrt{3}\right)+\log(2) \log \left(1+\sqrt{3} \right)$$  Mathematica is unable to give a closed form for the indefinite integral.  How can we prove this result? Please help me.  EDIT  Apart from this result, the following equalities are also known to exist: $$\begin{align*} \int_0^1 \frac{\log \left( 1+x^{4+\sqrt{15}}\right)}{1+x}\mathrm dx &amp;=\frac{\pi^2}{12} \left( 2-\sqrt{15}\right)+\log \left( \frac{1+\sqrt{5}}{2}\right)\log \left(2+\sqrt{3} \right) \\ &amp;\quad +\log(2)\log\left( \sqrt{3}+\sqrt{5}\right) \\ \int_0^1 \frac{\log \left( 1+x^{6+\sqrt{35}}\right)}{1+x}\mathrm dx &amp;= \frac{\pi^2}{12} \left( 3-\sqrt{35}\right)+\log \left(\frac{1+\sqrt{5}}{2} \right)\log \left(8+3\sqrt{7} \right) \\ &amp;\quad +\log(2) \log \left( \sqrt{5}+\sqrt{7}\right) \end{align*}$$  Please take a look . What is the easiest way to find and replace text in 20 text files in a directory? I have 20 text files with various extensions in a directory.  I want to replace "nnn" with "ooo" in all files.  I could import them into a project in Eclipse or Visual Studio to replace them all but that is overkill and would add other meta files etc.  What is a simple way to do this, I'm thinking: select all files, right click, choose some tool called (e.g. "QuickReplacer") and fill in find and replace, click and done.  Does anyone know of a tool like this? How is the Schroedinger equation a wave equation? Wave equations take the form:  $$\frac{ \partial^2 f}  {\partial t^2} = c^2 \nabla ^2f$$  But the Schroedinger equation takes the form:  $$i \hbar \frac{ \partial f}  {\partial t} = - \frac{\hbar ^2}{2m}\nabla ^2f + U(x) f$$  The partials with respect to time are not the same order. How can Schroedinger's equation be regarded as a wave equation?  And why are interference patterns (e.g in the double-slit experiment) so similar for water waves and quantum wavefunctions? When I shoot a ball vertically upward, its velocity is decreasing since  there is a downward acceleration of about $9.8\,\mathrm{ms}^{-2}$.   I have read that at the top most point, when $v = 0$, the acceleration is still $9.8\,\mathrm{ms}^{-2}$ in the downward direction where $v=0$. That is, the acceleration is still the same.  But at the highest point, the ball is stationary, so it is not even moving. How can it accelerate? How do I find a command if I don't know its name? As a Unix beginner, I often find myself wanting to know the name of the command that achieves a particular function I'm after. How can I go about finding out the name of the command, given a description of what it does? Is there a rhetorical term for remarks like "you're exactly what I've come to expect from..."? Is there a specific term for a statement that uses words such that their precise meaning conveys a subtext contrary to the colloquial meaning?  For example, the joke in Men in Black:     Gentlemen, congratulations. You're everything we've come to expect   from years of government training.   where the precise use of the words conveys a sarcastic meaning (ie that the candidates are inept because that's what he's come to expect from government training).  I was going to use "irony" to describe this but then realized this is basically the opposite of irony - the use of words to convey their literal intention, when a nonliteral intention was expected. Is it legal to add your publications to ResearchGate? I recently created a profile on . And to add your publications list it requires you to upload the paper. Is it legal to upload published journal articles on public servers, where everyone can download it for free? How does Incense work? Changing parameter values according to other parameter choice in Processing script using QGIS 3? If $l$ and $n$ are any positive integers, is there a  proof of the identity     $$\sum_{k=0}^{n}(-1)^{k}\binom{n}{k}(l-k)^n=n!\;$$   which uses the Inclusion-Exclusion Principle?  (If necessary, restrict to the case where $l\ge n$.)    This question is closely related to   and also Why won't the location of the light affect the direction of the shadows? So I'm new to blender, and I've been working on a project with a tutorial. (some of you might know this)   I was going through quite smoothly until I noticed that no matter where I place my light, the rendered version appears the same. (directly above the objects) I tried different types of lighting, different brightnesses, (light is currently at around 4.000 brightness) nothing works. But if I delete the light, it becomes dark and grainy. (I checked on the side bar, there are no other light sources or objects..)  Even if I put the light source under my objects, the rendered version appears the same.  Am I doing something wrong? Why can't I change the direction of the light?        Uh.. Since I'm not allowed to post more than 2 links, I'll just post extra info here (also replying to @bertmoog)  I tried changing the light types, but they all do nothing (except for Sun, of course, and Hemi, which is interpreted as Sun for some reason) The brightness is set on 4.200, color set to white, shadows enabled, etc. But it still won't do anything. As you can see, nothing appears in the preview.    EDIT: I found that by rotating the sun to point where I want it to, it works almost like normal point lighting (sorta). This pretty much solves my problem, but still, why won't the other lighting modes work? Disable the guest user completely in El Capitan without having to disable 'Find My Mac' I know it should be straight forward but unfortunately, it  isn't.  I did disable the guest user in the System Preferences by unchecking the checkbox for Allow guests to login in to this computer, but it still shows up on the login screen.  I have heard that disabling 'Find My Mac' would fix it for OS X Lion, but I want to keep it.  Is there a way to do this?