|
|
Browse by Tags
All Tags » pcre
Showing page 1 of 3 (22 total posts)
-
Here is a problem I have been banging my head at for a couple of days.I was wondering if anyone could help.
I have this class of strings with this pattern:
s1?=s2? s3 s4? = always follows s1 only, and only if s1 is not empty
s1 is ({?\(?word( word)*\)?\}?)? (it may be empty). If there is more that one ...
-
I am using PCRE (same with .Net) and I would have expected the following pattern to fail when i run it against the text below:
(?<B><)?[^%>]+(?(B)>)%
that is: look for a < , look for at least 1 char which is not % or > then, if a < was found look for a >, then look for a %
in other words find expressions like ....% ...
-
First of all thank you for taking the time to look into this.
Second, apologies for not providing more engine details. I should have known better.
I am using PCRE as you guessed and I am indeed looking for the underlined part in aaap1bbbp1cccp2ddd (I need p1 and p2 separated but that's easy).
I tried your pattern on a simple ...
-
Hello all, my first time posting, but I use the site often as a resource, really wonderful.
First, I want to say that I realize that RegEx is not the best choice for what I need to accomplish, however, the Encryption Engine my company wrote is homegrown and only permits standard Word Lists and RegExs (. So I am using RegEx, for good or for bad. ...
-
I'm writing search filters using regex (PCRE flavored).
My filter is this: ((?i)((\s(529|53[01247]))\s+security).+user\sname:(?!.{1,20}(\$|caller))(?!\sdomain))
The data looks something like this:
1 <13>Mar 22 09:11:16 10.0.1.7 MSWinEventLog 0 Security 3553368 Tue Mar 22 13:11:16 2011 537 Security SYSTEM User Failure Audit ...
-
I'm attempting to use PCRE as part of my scripting and have hit a mental block. Regex is not a strong point for me so please bear with me.
What I have is a file name such as this one:
My music name (Album Name - Artist Name) 2010_12_15_14_45_55 0001.mp3
What I want to do is remove the date/time/unique number from the name which was ...
-
Platform: PCRE
Purpose: am trying to teach myself a little PCRE. In particular an expression has been nagging me:
<?php
$text="this-that <a href=\"http://www.my-site.com/index.php\">this-that</a> ...
-
According to the documentation the 'u' modifer is for UTF8 not Unicode. It treats the sring as UTF8.
Doc:
u (PCRE_UTF8)
This modifier turns on additional functionality of PCRE that is incompatible with Perl. Pattern strings are treated as UTF-8. This modifier is available
from PHP 4.1.0 or greater on Unix and from PHP 4.2.3 on win32. ...
-
First off let me say I'm a bit over my
head here. Not regex part but host the language of the regex engine.
Many moons ago I posted a blog article
stating why you could not write a regex that validated an e-mail
address 100%. Well this is still true, however in that
posted I also stated that the pattern was so massive ...
-
It's OK, I think I've found the answer to my own question. The # signs bracket the actual regular expression, and the e and the s are modifiers - e is equivalent to PREG_REPLACE_EVAL and s is equivalent to PCRE_DOTALL. Maybe these are things which are so familiar to the experienced players that they almost go without saying, but ...
1
|
|
|