I came up with the following glob for matching everything but . and ..:  * .[!.]* ..?*  Does this really do its job?
51665
I was surprised recently when I did something like mv ./* ../somedirectory and found that files like .gitignore were not moved.  I do most of my work in zsh on OS X, and this surprise bit me in bash on CentOS.  I tried bash on OS X and found the same behavior: * does not match dot files.  This seems very undesirable to me, but apparently it's the bash default.  (It may be the zsh default too for all I remember, but I may have changed it years ago in my .zshrc and forgotten it ever worked differently.)  How can I configure bash to behave as I expected: for * to match all files, and not ignore dot files.  In case this is at all unclear, here's how to reproduce it    cd /tmp mkdir {t,d}est touch test/{.,}{1,2,3,4,5,6,7} ls -hal test mv test/* dest ls -hal test     # notice dot files are still there ls -hal dest     # notice only some files were mv'ed
46175
What solutions accomplish the same auto-completion that SO uses for entering tags?  There are plugins that can handle one word but I haven't seen any that handle multiple words.
71802
Is there a good way to have a Map&lt;String, ?&gt; get and put ignoring case?
31805
I want to highlight every [ in any color so i can see the hidden message here:   [###[#[[[#[###[#[[[#[[[#[###[#[[[ [###[##[##[[##[#[####[##[[##[##[# [######[##[#[#[#[[[##[##[#[#[##[# [######[##[##[[#[####[##[##[[##[# [[[###[[[#[###[#[###[[[#[###[#[[[
52153
I have a script that parses the filenames of TV episodes (show.name.s01e02.avi for example), grabs the episode name (from the www.thetvdb.com API) and automatically renames them into something nicer (Show Name - [01x02].avi)  The script works fine, that is until you try and use it on files that have Unicode show-names (something I never really thought about, since all the files I have are English, so mostly pretty-much all fall within [a-zA-Z0-9'\-])  How can I allow the regular expressions to match accented characters and the likes? Currently the regex's config section looks like..  config['valid_filename_chars'] = """0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@£$%^&amp;*()_+=-[]{}"'.,&lt;&gt;`~? """ config['valid_filename_chars_regex'] = re.escape(config['valid_filename_chars'])  config['name_parse'] = [     # foo_[s01]_[e01]     re.compile('''^([%s]+?)[ \._\-]\[[Ss]([0-9]+?)\]_\[[Ee]([0-9]+?)\]?[^\\/]*$'''% (config['valid_filename_chars_regex'])),     # foo.1x09*     re.compile('''^([%s]+?)[ \._\-]\[?([0-9]+)x([0-9]+)[^\\/]*$''' % (config['valid_filename_chars_regex'])),     # foo.s01.e01, foo.s01_e01     re.compile('''^([%s]+?)[ \._\-][Ss]([0-9]+)[\.\- ]?[Ee]([0-9]+)[^\\/]*$''' % (config['valid_filename_chars_regex'])),     # foo.103*     re.compile('''^([%s]+)[ \._\-]([0-9]{1})([0-9]{2})[\._ -][^\\/]*$''' % (config['valid_filename_chars_regex'])),     # foo.0103*     re.compile('''^([%s]+)[ \._\-]([0-9]{2})([0-9]{2,3})[\._ -][^\\/]*$''' % (config['valid_filename_chars_regex'])), ]
75675
I have a problem, this is what it looks like:     And this is the code:  \subsection{Bakterienst\"amme und Anzuchtbedingungen}   Where does the huge whitespace come from?
118878
So I have been wondering for a while now what these entries are and what they do, also what the format of them are. They look similar to JSON but are definitely not JSON.   a:1:{s:12:"jetlocations";a:2:{s:5:"label";s:12:"JetLocations";s:4:"type";s:6:"editor";}}   I have searched to try and find out what these might be but come up with nothing.
70098
I'm trying to get a regex that will match:  somefile_1.txt somefile_2.txt somefile_{anything}.txt   but not match:  somefile_16.txt   I tried  somefile_[^(16)].txt   with no luck (it includes even the "16" record)
61276
Today, once again, the  came to my attention and I have decided to try to  using XeLaTeX. The result is far from perfect, worse even than Chrome's rendering.  Is there a way I can improve the result? Is XeLaTeX and LuaLaTeX incapable of handling the Ponny?  :  \documentclass[]{article} \usepackage{lmodern} \usepackage{amssymb,amsmath} \usepackage{ifxetex,ifluatex} \usepackage{fontspec} \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase} \IfFileExists{upquote.sty}{\usepackage{upquote}}{} \IfFileExists{microtype.sty}{\usepackage{microtype}}{} \usepackage[normalem]{ulem} \setmainfont{Doulos SIL}  \title{html - RegEx match open tags except XHTML self-contained tags - Stack Overflow} \date{} \author{StackOverflow}  \begin{document} \maketitle  Rege̿̔̉x-based HTML parsers are the cancer that is killing StackOverflow \emph{it is too late it is too late we cannot be saved} the trangession of a chi͡ld ensures regex will consume all living tissue (except for HTML which it cannot, as previously prophesied) \emph{dear lord help us how can anyone survive this scourge} using regex to parse HTML has doomed humanity to an eternity of dread torture and security holes \emph{using rege}x as a tool to process HTML establishes a brea\emph{ch between this world} and the dread realm of c͒ͪo͛ͫrrupt entities (like SGML entities, but \emph{more corrupt) a mere glimp}se of the world of reg​\textbf{ex parsers for HTML will ins}​tantly transport a p\emph{rogrammer's consciousness i}nto a w\emph{orl}d of ceaseless screaming, he comes\sout{, the pestilent sl}ithy regex-infection wil​\textbf{l devour your HT}​ML parser, application and existence for all time like Visual Basic only worse \emph{he comes he com}es \emph{do not fi}​ght h\textbf{e com̡e̶s, ̕h̵i}​s un̨ho͞ly radiańcé de\emph{stro҉ying all enli̍̈́̂̈́ghtenment, HTML tags \textbf{lea͠ki̧n͘g fr̶ǫm ̡yo​͟ur eye͢s̸ ̛l̕ik͏e liq}​uid p}ain, the song of re̸gular exp​re\sout{ssion parsing} will exti\emph{​nguish the voices of mor​\textbf{tal man from the sp}​here I can see it can you see ̲͚̖͔̙î̩́t̲͎̩̱͔́̋̀ it is beautiful t​}he f\texttt{inal snuf}fing o\emph{f the lie​\textbf{s of Man ALL IS LOŚ͖̩͇̗̪̏̈́T A}}\textbf{LL I​S L}OST th\emph{e pon̷y he come}s he c̶̮om\sout{es he co}\textbf{\sout{me}s t\emph{he} ich​}or permeat\emph{es al}l MY FAC\emph{E MY FACE ᵒh god n\textbf{o NO NOO̼}}\textbf{O​O N}Θ stop t\emph{he an​*̶͑̾̾​̅ͫ͏̙̤g͇̫͛͆̾ͫ̑͆l͖͉̗̩̳̟̍ͫͥͨ}e̠̅s\texttt{ ͎a̧͈͖r̽̾̈́͒͑e} n\textbf{​ot rè̑ͧ̌aͨl̘̝̙̃ͤ͂̾̆ ZA̡͊͠͝LGΌ ISͮ̂҉̯͈͕̹̘̱ T}O͇̹̺ͅƝ̴ȳ̳ TH̘\textbf{Ë͖́̉ ͠P̯͍̭O̚​N̐Y̡ H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝}S̨̥̫͎̭ͯ̿̔̀ͅ  \end{document}   UPDATE  Using the Doulos SIL font gets me something closer to what Firefox renders but still far from perfect.
2704
Obviously, you can use the | (pipe?) to represent OR, but is there a way to represent AND as well?  Specifically, I'd like to match paragraphs of text that contain ALL of a certain phrase, but in no particular order.
55298
Lets say that I have a directory with the following files (among others):  touch doc-mike.txt doc-jane.txt doc-susan.txt   I can do something in a script with those files using a construct like:  for fname in doc-*.txt; do     echo input: ${fname} done   But if I want to get the substring of the filename that matches the wildcard I have to jump through some ugly hoops:  for fname in doc-*.txt; do     wildcard=${fname#doc-}     wildcard=${wildcard%.txt}      echo input: ${fname} output: output-${wildcard}.results done   That works:  input: doc-jane.txt output: output-jane.results input: doc-mike.txt output: output-mike.results input: doc-susan.txt output: output-susan.results   but I feel like there has to be a better/easier way to get the substring that matches the "*" glob wildcard
76370
I wanted to look for some questions to answer, so I went to . It came up with some really weird tags, as seen in this image:        , , , , and  are the tags in which I have the most posts. I also have  that has the tags , , and .  When I clicked on |bug|reputation|achievements-dialog|:        After I gave myself a favorite tag it acted as normal filtering the unanswered questions by that tag.
56815
Is there a way to specify a regular expression to match every 2nd occurrence of a pattern in a string?  Examples   searching for a against string abcdabcd should find one occurrence at position 5 searching for ab  against string abcdabcd should find one occurrence at position 5 searching for dab  against string abcdabcd should find no occurrences searching for a against string aaaa should find two occurrences at positions 2 and 4
72476
My current best bet is:  for i in $(find . -name *.jpg); do echo $i; done   Problem: does not handle spaces in filenames.   Note: I would also love a graphical way of doing this, such as the "tree" command.
69562
I've been retagging posts matching [special] -character -[character] is:question  The sidebar gives this helpful description of my query:     results found not containing   and not containing   tagged with       not       search options   questions only   It looks like there are some words missing there...
4355
For example, this regex  (.*)&lt;FooBar&gt;   will match:  abcde&lt;FooBar&gt;   But how do I get it to match across multiple lines?  abcde fghij&lt;FooBar&gt;
80932
I have a data stream that may contain \r, \n, \r\n, \n\r or any combination of them.  Is there a simple way to normalize the data to make all of them simply become \r\n pairs to make display more consistent?  So something that would yield this kind of translation table:  \r     --&gt; \r\n \n     --&gt; \r\n \n\n   --&gt; \r\n\r\n \n\r   --&gt; \r\n \r\n   --&gt; \r\n \r\n\n --&gt; \r\n\r\n