I have a phone number which can contain below values:  • Digits: 0-9 • Special character: "#", "*", "-", "_", " ", "(", ")", "+", "?" • Alphabets: "x", "X"   These above can be more than once in phone number.  If any other value/character besides listed in above list is present it should fail.I tried creating regex but it fails with message "Dangling meta character '*'".   Below is the regex tried:   if(!str.matches("([0-9]*|*|#|(|)|?|+|_|-)"))    {        System.out.println("--not matched--");    }   Please help me in creating a regex for above.
I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?
Differences between /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin, /usr/local/sbin MySQL string replace Photoshop using Marque Tool > Path > Circular But Not a perfect shape? Please consider this image below :   This is happened when I have a circular shape (marquee tool selection). THen after that I converted to Work Path (by right click of that selection). And I add 2.0 as its Tolerance Pixel.   After applying it. The shape become not perfect, could you see the difference? I make it with a black background so everyone could see it from the image no.2.  I realized this is a problem, because If i use that path for placing a text. the text wont follow the correct path as circular (selection), instead ... the shape a bit changed (i think it's ugly shape :: see the detail of the arrow).  How to solve this case ? I'm using Photoshop CS3. What is the radius of convergence of $\sum z^{n!}$? How to find the radius of convergence of $\sum z^{n!}$?   I'm used to applying the ratio test to power series of the form $\sum a_{n}z^{n}$, but for a different power of $z$, I am a bit stumped. What about $\sum z^{2n+a}$ for another example? Where $a\in \mathbb{R}$. showing that a group of order 45 is abelian Show: $ f(a) = a,\ f(b) = b \implies \int_a^b \left[ f(x) + f^{-1}(x) \right] \, \mathrm{d}x = b^2 - a^2 $ Execute vs Read bit. How do directory permissions in Linux work? Problem with clickable archive.org URLs Capitalize fields of study? Do I say "I study computer science," or "I study Computer Science"? Similarly, "I really liked that computer science course," vs. "I really liked that Computer Science course." Just need help understanding this question, as I don't really understand what a continuous random vector is. My limited understanding is that a continuous random vector must be completely continuous (so for continuous X and Y this is satisfied) and that to get the probability of the random vector occurring, we double integrate over the supports (of X and Y obviously). My guess is then, that the c.r.v (X,Y) IS a continuous random vector.  Also, what of the converse? If (X,Y) is a continuous random vector, then are X and Y continuous random variables? I also think this is correct, as the continuity of the vector MUST imply the continuity of X and Y, although I'm honestly not sure.  Thanks hyperlink name with biblatex authoryear (biblatex 1.4b) Reading order for Dragonlance? I have noticed for a few months that my mouse will randomly jerk across the screen. I'm super paranoid about security. But this is just silly!  Has anyone else experienced this, and found out what causes it? It happens to me every couple of days. The cursor will jump across the screen about 1000+ pixels. I thought it was my mousepad - changed it, and that's not it.  I imagine it's just a hardware issue.  This is on a PC with a Razer Naga, wired mouse. The mouse worked for about a year before I started noticing these issues. They have persisted even after a reformat / reinstall. RELATED,ESTABLISHED state in iptables What do the words 'RELATED' and 'ESTABLISHED' individually signify in RELATED,ESTABLISHED state in iptables? MacPorts fails to find 'make' I've installed Xcode and MacPorts on a brand new mid-2013 MacBook Air, but MacPorts doesn't work, saying that it cannot find anything.  mba:~ cnst$ sudo port install wget Warning: The Command Line Tools for Xcode don't appear to be installed; most ports will likely fail to build. Warning: See http://guide.macports.org/chunked/installing.xcode.html for more information. ---&gt;  Computing dependencies for wgetError: Unable to execute port: can't read "build.cmd": Failed to locate 'make' in path: '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or at its MacPorts configuration time location, did you move it? mba:~ cnst$   And, indeed, there is no make or clang in the path, but it is definitely installed, though:  mba:~ cnst$ find /Applications -name "clang" -or -name "make" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang /Applications/Xcode.app/Contents/Developer/usr/bin/make mba:~ cnst$   Why is there no make or clang in the path?  Why MacPorts doesn't work?  I notice that  mentions that you have to install something from ADC, Apple Command Line Developer Tools, but ADC doesn't work since last Thursday or Friday due to their security breach, so, the developer tools are nowhere to be found.  What's the proper solution here? Positivity of a determinant What rolls should players get to see? I'm a new DM and over the last few weeks I've been slowly learning the game and how it runs. My party consists of 5 PCs.   One thing I have been wondering after our last two sessions is: What rolls should all the players see and which rolls shouldn't they see?  Is there a comprehensive list of what rolls are public and which go behind the DM screen, or is it more down to house rules or personal preference? How can you turn on or off the cheats after you make an offline server?My brother did something in settings but I can't find it. How to learn commutative algebra? “He is small enough to walk.” But baby wasn't walking so why didn't they use “small” instead of “small enough”?