Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
... many thanks for your great help

It may or may not have been so great, but you are very welcome in any case.

... you are obviously the most helpful Monk in this forum ...

Many thanks for the compliment, but if you are around this place for long, you will find others who are much more patient and helpful (not to mention authoritative!) than I. In general, the effort the gentle Monks will expend to help you is in direct proportion to the effort you are willing to expend to help yourself.

... I had difficulties in understanding the real meaning of $pre and also the $post ... this new form of writing a regex is new for me ...

I like this approach to composing regexes. The rationale for factoring regexes in this way is the same as for factoring functions into subsidiary functions: they become easier to think about, maintain, etc. And, of course, the free use of whitespace allowed by the  /x switch greatly aids readability.

In my OP I have abreviated my data ... I have just overlooked the space betweeen FEN and the " ... in my real data there is leading whitespace before the 'Weiss' line, but in the testfile I have deleted it ...

I'm sorry if a note of annoyance crept into my responses anent the changing data examples in your posts. These data are instances of "specification by example", and changing a specification, however implicit, after work has been done is always irritating. The design of regexes, parsers, etc., for data handling is very sensitive to the detailed structure of the data. The Devil is in the details, and sometimes the Devil uses these details to tempt us to the deadly sin of Wrath!


Give a man a fish:  <%-{-{-{-<


In reply to Re^5: Regex with condition by AnomalousMonk
in thread Regex with condition by OldChamp

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 studying the Monastery: (5)
As of 2024-04-23 08:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found