For anyone who is having trouble with regular expressions, I suggest you have a look at [this site](https://regexper.com/#%5Cd%7B1%2C3%7D) by Jeff Avallone. It takes a regular expression in the native (cryptic) format and produces a visual display of the same expression. For example, ^[a-z0-9_-]{3,16}$ becomes ![Screenshot_(10).png](/attachments/large/3/8a654e76556ecc115d044b9d7626b810.png "align-center") and the pattern for an email address    ^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$ becomes ![Screenshot_(11).png](/attachments/large/3/a18ac7c9e13bb301473bfbf69c7bbd46.png "align-center") One caveat - you will see \d{3,5} expanded as ![Screenshot_(12).png](/attachments/small/3/5d48e25ed2af2f0033d919087ecf2e8c.png "align-center") which may seem incorrect at first glance, however, the `2...4 times` refers not to the number of digits but the number of extra "trips" back through the loop so if you …

Member Avatar
+8 forum 0

Hi, Can you help me in identifiying the meaning of this reqular expression? public static final Pattern pattern = Pattern.compile("^.*(?=.{8,})(?=.*[a-z])(?=.*[A-Z])(?=.*[\\W_]).*$"); **Thanks, Aravind**

Member Avatar
Member Avatar
+0 forum 1

I have inputs in the form like below Data: 01 18 01 23 45 67 89 AB CD EF FE DC BA 98 76 54 32 10 01 23 45 67 89 AB CD EF 02 18 67 89 AB CD EF FE DC BA 98 76 54 32 10 01 23 45 67 89 AB CD EF FE DC BA 03 10 33 33 33 33 33 33 33 33 44 44 44 44 44 44 44 44 04 10 44 44 44 44 44 44 44 44 33 33 33 33 33 33 33 33 05 10 55 …

Member Avatar
Member Avatar
+0 forum 1

Hi, I have a 3-column data (below) from excel file. How can I write a perl code to sort all rows according to the first numeric number of a numeric interval and the word "complement" if they appear before the numeric interval as shown in the expeceted output below? Data: 81228..81500 Gene 22 81500..81856 Gene 17 complement(82256..84292) Gene 75 84307..85275 Gene 23 2.7.4.8 complement(97435..98067) Gene 91 complement(85325..86527) Gene 34 3.5.1.32 86756..87025 Gene 36 complement(92373..93341) Gene 45 88076..90292 Gene 34 complement(90289..92415) Gene 89 3.6.1.- 93492..94931 Gene 92 2.2.1.1 complement(97087..97347) Gene 12 2.7.7.6 complement(94928..97060) Gene 58 2.5.6.3, 3.1.8.2 79951..81162 Gene 3 1.7.1.2 …

Member Avatar
Member Avatar
+0 forum 3

Herro there :) i'm having serious trouble understaning even the basics of regular expressions in perl. im trying to make a rainmeter skin that lets you search google from desktop and parses the first five links, and a picture if possible.

Member Avatar
Member Avatar
+0 forum 2

This is the block of data I have to work with: 5 5 5 6 5 8 9 5 6 8 good, very good, excellent, good 7 7 8 7 6 7 8 8 9 7 very good, Good, excellent, very good 8 7 6 7 8 7 5 6 8 7 GOOD, VERY GOOD, GOOD, AVERAGE 9 9 9 8 9 7 9 8 9 9 Excellent, very good, very good, excellent 7 8 8 7 8 7 8 9 6 8 very good, good, excellent, excellent 6 5 6 4 5 6 5 6 6 6 good, average, …

Member Avatar
Member Avatar
+0 forum 1

Hi Guys, I am writing a Perl script that needs to initiate various http (or https) requests. Before doing so, I would like first to verify that a given string is indeed a valid URL address. I would like to do so (preferably) **without** using regexp. Reason being, that URLs can be quite complex, and I'd prefer using a generic perl method (like a module). That way I am waaay more probable not to have missed any end-cases. Also, it would increase code-readability. Thanks a bunch, -FH

Member Avatar
Member Avatar
+0 forum 4

i'm developing an app that i intend to run on a client's intranet. i want to ensure that only email addresses with the client's domain should be registered. how do i achieve this using regular expressions?

Member Avatar
Member Avatar
+0 forum 4

Hi all, I'm trying to match all PHP reserved keywords in a string, but this string also contains a bunch of \4 characters [i]between[/i] the letters. So, for example, if I have the string [ICODE]'f\4u\4n\4c\4t\4i\4o\4n@@@some other weird characters@@@'[/ICODE] and the array [ICODE]['abstract','and','array','as','break','case','catch','class','clone','const','continue','declare','default','do','else','elseif','enddeclare','endfor','endforeach','endif','endswitch','endwhile','extends','final','for','foreach','function','global','goto','if','implements','interface','instanceof','namespace','new','or','private','protected','public','static','switch','throw','try','use','var','while','xor'][/ICODE] and I want to make 'function' match '\4f\4u\4n\4c\4t\4i\4o\4n\4', but only if it's not preceded, nor followed by a letter. I tried: [CODE]var php_keywords = function() { var phpkl = ['abstract','and','array','as','break','case','catch','class','clone','const','continue','declare','default','do','else','elseif','enddeclare','endfor','endforeach','endif','endswitch','endwhile','extends','final','for','foreach','function','global','goto','if','implements','interface','instanceof','namespace','new','or','private','protected','public','static','switch','throw','try','use','var','while','xor'], phpks = ''; for(var i = 0; i < phpkl.length; i++) for(var j = 0; j < phpkl[i].length; j++) phpks += (j > 0 ? '\4' : i …

Member Avatar
+0 forum 0

I am trying to create a regular expression that can parse both variables ($src and $src1) and get the result of Prop, Nam and Tra. (Ignoring any information after). [ICODE] <?php $src = "{{Data#Prop=11a|Nam=33a|Tra=46b}}"; $src1 = "{{Data#Prop=11a|Nam=33a|Tra=46b|extra=384v}}"; preg_match_all('/\{\{Data#Prop\=([a-z 0-9]*)\|Nam\=([a-z 0-9]*)\|Tra=([a-z 0-9]*)????\}\}/Umis', $src, $st); ?>[/ICODE] For both $src and $src1 the script should return $st[0] = 11a; $st[1] = "33a"; $st[2] = "46b; I need to put a expression where the question marks are '????' that optionally looks for '\|(.*)' If I include '\|(.*)' $src1 works but $src doesn't work, if I remove '\|(.*)' $src works but $src1 doesn't work.

Member Avatar
Member Avatar
+0 forum 1

Is it the boost library? Regex in particular? I have searched and searched, but this is all I could come up with. If this is the correct library, then how do I get it to work in Dev-C++? I managed to add all the boost .h files to my Dev-C++ include files folder, so now it will compile when I #include a boost header file. Does it even work in Dev-C++ though? I couldn't get it installed properly in Visual Studio. I think the path name was not quite right (to include the boost root directory). Also, how do you …

Member Avatar
Member Avatar
+0 forum 1

The End.