regex select a block of html code? [closed] - regex

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I need to select a block of code so I can remove it using TextSoap.
How can I select everything from the opening "< !DOCTYPE" to the first "< h1>"?
Thanks.

A general regex could look like '^<!DOCTYPE(.|\n)*?<h1>' but like the commenters said correctly, what language are you using? Languages may have different ways of dealing with regexes. You can also try this: http://regexpal.com/

Related

please assist with this regex [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I am trying to write a regex for only the text that is in the parenthesis, INCLUDING the parenthesis in the following sentence: ""Here is a house. The house is blue. (12.6)"". So I want to select --> (12.6) <--
Something like:
\(\d+\.\d+\)
This is assuming you'll have only digits in that sub-string, and always in the form: (xy.zd)
Since I have no clue what language, tool, pattern, wtv you're using, I'm just leaving the basic regex.
In JavaScript this regex returns an array of the text items surrounded with brackets:
"Here is a house. The house is blue. (12.6) (3)".match(/\([^\)]*\)/g);
Returns:
["(12.6)", "(3)"]
Cheers.

I need to check a Regular expression [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have a excel file that must have this name format, where xxx is a number and yymmdd is a date. Only xxx and yymmdd change, the rest is always the same.
CDFSDDRCxxxCurryymmdd.xls
What is a regex I can use to check if it is correct??
Try with following regex:
^CDFSDDRC\d{3}Curr\d{6}\.xls$
In C# I think you can try something like this :
"CDFSDDRC(?<xxx>[0-9]+)Curr(?<yymmdd>[0-9][0-9][0|1][0-9][0-3][0-9])\.xls"
But you will have to check matches.Groups["yymmdd"].value once more to check for special cases such as CDFSDDRC123Curr321539.xls that match but contains an incorrect date.
I think the following should work.
CDFSDDRC\d[3]Curr(([0-9]{2}(0[13578]|1[02])(0[1-9]|[12][0-9]|3[01]))|([0-9]{2}(0[469]|1[1])(0[1-9]|[12][0-9]|30))|([0-9]{2}(02)(0[1-9]|1[0-9]|2[0-8]))|((((04|08|[2468][048]|[13579][26]))|00)(02)29))\.xsl
I think that you have to escape the backslashes in the C# string.
"CDFSDDRC\\d[3]Curr(([0-9]{2}(0[13578]|1[02])(0[1-9]|[12][0-9]|3[01]))|([0-9]{2}(0[469]|1[1])(0[1-9]|[12][0-9]|30))|([0-9]{2}(02)(0[1-9]|1[0-9]|2[0-8]))|((((04|08|[2468][048]|[13579][26]))|00)(02)29))\\.xsl"

Meaning of <!cfmodule/> in coldFusion [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Somebody know what is mean
expresion like this:
<!cfmodule template="/backend/_modules/_sendDeclinedEmailNotice.cfm">
Actually I don't know what means ! in this line.
It doesn't mean anything. That will just keep the tag from being interpreted by ColdFusion. If you place that on a page, and then view in the browser, you'll see the actualy <!cfmodule text in the browser. Someone apparently just added an exclamation point to keep the module from running, instead of properly commenting it out.

url regex without http://www [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
i need a url regex which validates the url string without http://www. or https://www.
any ideas?
It would probably be a good idea to keep the www's intact in order to preserve the sub-domain. A regex pattern like this:
^([a-zA-Z0-9]+(\.[a-zA-Z0-9]+)+.*)$
would match a URL that is not prefixed by a protocol (http://,https://,ftp://,etc).

Regex: List of Mailadresses [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
input: name <hui.li#xxx.ch>; hans#dhdfhgdfgh <hans.dampf#xxxx>;
Output: e1#mail.com, e2#mail.com, e3#mail.com,e#mail.com
I want to erase the stuff between: >;(?*)< But my regex isn't working.
If >;(?*)< is the Regex you tried, then the question mark is probably wrong. It has no special meaning. Try using >;(.*)< instead and see if thats what you wanted.
you should go another way. Instead of filtering the decoration you should write a regex, that matches only email addresses. Get the result as an array and join it with ", "
To find valid emails there are plenty of expressions out there. More ore less accurate. http://regexlib.com/Search.aspx?k=email