• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Quick perl question

pushVTEC

Senior member
Can someone explain this line to me, I know /d+ searches for a string of digits, but the other stuff could use some explaining.

if($line =~ /:x🙁\d+):\d+🙁[^:]*)🙁[^:]+)🙁[^:]+)/) {

I know it says if line contains then i'm lost.

Does anyone have a good site where the various stuff in that is explained?
 
(i use a b and c instead of 10/11/12 to keep the alignment more readable)

parts of regex:
1. :
2. x
3. :
4. (\d+)
5. :
6. \d+
7. :
8. ([^:]*)
9. :
a. ([^:]+)
b. :
c. ([^:]+)

explanation:
1. a colon
2. then an x
3. then a colon
4. then one or more digits
5. then a colon
6. then one or more digits
7. then a colon
8. then possibly some non-colon characters
9. then a colon
a. then definitely some non-colon characters
b. then a colon
c. then definitely some non-colon characters

parentheses are only for grouping; all of the parentheses in this case could be taken out and it'd work just the same. (\d+) matches the same as \d+.
 
So the / and / signify the beginning and end of using regular expressions right? BTW thanks a lot for the translation 🙂
 
Back
Top