Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Unix: What is the difference between a wild-card and a regular expression? Write the wildcard ls *.c as a regular expression in ls | grep 'put your regular expression here'.

I'd grin and point out that trick questions aren't very nice, then tell you that there is no difference. A wildcard is a regular expression, it just happens to have different syntax from the regular expressions you use in perl or grep. I'd also ask you which version of grep you meant, and enquire as to whether or not it supported PCRE or not.

And IMO this isn't a "unix" question, grep has been ported to just about every OS, and likewise just about every OS has ways of using regular expressions to query the file system.

PS: apologies, I just hate it when people put trick questions into tests. Like many people I'm not particularly good in test situations at all, and I dont need the stress of second guessing the question on top of trying to get the right answer while dealing with the stress of the test enviornment.

---
$world=~s/war/peace/g


In reply to Re: On Interviewing and Interview Questions by demerphq
in thread On Interviewing and Interview Questions by eyepopslikeamosquito

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-18 03:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found