Regular expressions - problem
Hi @ all,
I need a regular expression more difficult, I don't know Don t.
I have a big file with many pages .htm (800-1000) and I have to do the following:
http://www.domain.de/ AB % 32-xyz? myshop = 123
I have to delete the "ab % 32-xyz", the problem is, that it is, it could be each symbol, the letter or digit.
Then the area between " " http://www.domain.de/ ' 'and'? myshop = 123 "(these 2 areas are identical in all documents each time) should be removed.
Anyone could tell me how to do this with regular expressions in dreamweaver?
Thank you
Felix
P.S.: Sorry, my English is not so good, I m from the Germany
You want to replace the random text with anything?
If this is not the case, this is how you do in DW:
- Make a backup of the folder that you want to change, just in case something goes wrong
- Edition > search and replace
- In the find and Replace dialog box, select the folder in the menu drop-down "search in" and select the folder that you want to use.
- Select the Source Code from the drop-down search menu.
- Place the following code in the search text box:
(http://www \.domain\.de/) [^?] +(\? MYshop = 123) - Place the following code in the text box replace:
$1$ 2 - In Options, select the checkbox "use regular expression.
- Click on replace all. Dreamweaver warns you that the operation cannot be undone in pages that are not currently open. As long as you have made a backup, click OK to run the operation.
Tags: Dreamweaver
Similar Questions
-
the simple regular expression problem
Hello
I need assistance with regular expressions. I have a situation when I need to get data from one table to the other and I think that my problem can be solved using REG EXP, but I don't know how to use them properly.
I need to separate fileld varchar2 which is basically number/number in 2 separate number fields
I need to get the code in the co and po columns. I think the result should look something like this, but:CREATE TABLE tst (CODE VARCHAR2(10)); INSERT INTO tst VALUES('10/15'); INSERT INTO tst VALUES('13/12'); INSERT INTO tst VALUES('30'); INSERT INTO tst VALUES('15'); CREATE TABLE tst2 (po NUMBER, co NUMBER);
Any help appreciatedINSERT INTO tst2 SELECT regexp_substr(CODE 'something here to get the number before /') AS po, regexpr_substr(CODE 'something here to get number after') AS co FROM tst;
Agree with the above,
However, if you really want to know how to do with regular expressions you can do it like this...
SQL> select regexp_substr('10/15','[^/]+',1,1) from dual; RE -- 10 SQL> select regexp_substr('10/15','[^/]+',1,2) from dual; RE -- 15
-
The regular expression problem
Dear friends,
In my script I have some sections that test the contents of an edit field before it is processed further.
Perfectly things like the following:
var re_Def = /#[A-Za-z][A-Za-z0-9_]+/; // valid variable name ? items = ["#correct", "notcorrect", "#This_is4", "#thisIs", "@something", "#ALLOK", "", ]; // search 0 -1 -1!! -1!! -1 -1!! -1 <--- incorrect method // test true false true true false true false <--- correct method for (var j = 0; j < items.length; j++) { var item = items[j]; alert ("'" + item + "' ==> " + item.search(re_Def) + "\n" + re_Def.test(item)); } var re_Def = /(\[ROW +\d+\]|\[COL +\d+\]|\[CELL +\d+, +\d+\]|Left *\(\d*\)|Right *\(\d*\)|Above *\(\d*\)|Below *\(\d*\))/; items = ["[ROW 17]", "[Row n]", "[ROW n]", "[CELL 3, 9]", "[CELL 3 9]", "Abbove()", "Right(3)"]; // result true false false true false false true for (var j = 0; j < items.length; j++) { alert ("'" + items[j] + "' ==> " + re_Def.test(items[j])); }
But what follows always returns false, independly of the content of the string element:
var re_Def = /{[EFJ]\d*}|{I}/; // valid format def? var item = "{E27}"; var result = re_Def.test(item); alert (result); // false !!
RegEx buddy told me, that
-l' REGULAR expression is correct
-the result must be true, not false-The verbose definition of the RegEx is:
Match is the following regular expression (attempting the next alternative only if this one fails) "{\d* [EYF]}."
Match the character "{" literally "{}".
Match a single character present in the list "J" "[EYF]."
Match a single digit 0. 9 paper"\d*»
Between zero and unlimited times, as many times as possible, giving as needed (greedy) «*»
Match the character "}" literally "}".
Or match number 2 below (the entire match attempt fails if it cannot match) regular expression "{i}".
Match the characters "{i}" literally "{i}".Typo unrecognized? Test the faulty method?
Results are fake, as soon as I use the list of characters []] - but look at the first block of code: there are also lists of character they are treated properly.
The braces in the regular expression must be escaped to be taken literally:
var re_Def = /\{[EFJ]\d*\}/;
Kind regards
JoH
-
Regular expression, problem when literals have content "I_".
Hello
I guess it seems to be a bug/defect of Oracle. If I do this wrong, please let me know.
I need to remove the "_VERSION' coming to the latest in a string column. For example, if the string is WINDOWS_XP_VERSION, then the output should be WINDOWS_XP.
But if you run the query below
SELECT
REGEXP_SUBSTR (['AA_TEST_3_XI_VERSION ',' \w+[^_VERSION]') t1.
REGEXP_SUBSTR (['AA_TEST_3_Xi_VERSION ',' \w+[^_VERSION]') t2.
REGEXP_SUBSTR (['AA_TEST_3_XIA_VERSION ',' \w+[^_VERSION]') t3
FROM DUAL;
T1 T2 T3
AA_TEST_3_X AA_TEST_3_Xi AA_TEST_3_XIA
1 selected lines
It seems that the problem exists only when I use "I_" and works well with "i_". I checked with a few other characters and everything worked fine.
Any ideas? I use 11g.
Thank you
Sharminany string that does not "_VERSION", it would return NULL
You would need a small correction:
SQL> with t as ( select 'AA_TEST_3_XV_VERSION' str from dual union all select 'AA_TEST_3_XE_VERSION' from dual union all select 'AA_TEST_3_XIR_VERSION' from dual union all select 'AA_TEST_3_XIR' from dual ) select regexp_substr (str, '(\w+?)(_VERSION)?$',1,1,null,1) str from t / STR ------------------------------- AA_TEST_3_XV AA_TEST_3_XE AA_TEST_3_XIR AA_TEST_3_XIR 4 rows selected.
-
Chain problem: not being able to escape a bracket for a possible regular expression
So, I have barely any idea of how to use regular expressions except a little knowledge of it in PHP.
What I'm trying to do is to separate the first part of a string of qualifier, so I need a regular expression since ideally I wish I could. The problem I have is that my attempt of separation does not work. I tried to do what I think the model or class Matcher, I tried to use String.split, and I tried using the regular String.replace method. What I'm trying to do is illustrated (I hope) in the following NBS:
From my understanding, the parentheses are supposed to be a wild card of sorts, so they would need to be escaped in order to be taken as a literal, which means that line 7 is supposed to correspond to any of the characters inside the brackets where the opening is preceded by a space and then delete them. The problem I have is that escaping brackets generates an error and does not escape their product the original string. So I don't know how to tell Java I use actually literal parentheses.public class SSCCE { public static void main(final String args[]) { final String testString = "I want to keep this sentence. (I wish to "+ "discard this sentence and the space in between the sentences.)"; final String testExtract = testString.replace(" \(.+\)",""); System.out.println(testExtract); } }
I tried to configure my preferences of error to ignore everything, but it does not work.
I don't know if it's important, but I use Java 1.6 and Eclipse for PHP 1.3.2.20110218 - 0812.rp0428 wrote:
Shouldn't be using replaceAll if you use a regular expression?http://docs.Oracle.com/javase/6/docs/API/Java/lang/string.html
and, on the assumption that you actually use a replaceAll(), you need to escape to the '-' characters as they are themselves i.e. Java escape characters
" \\(.+\\)"
In addition, the use of ".". +"can lead lead to important feedback. In this simple example you probably won't notice it, but in general, you'd better avoid the return back by using the reluctant modifier or by replacing the '.' by a character set that does not include the character terminal.
-
Problem with regular Expression
Hello!!
I have a problem with the regular expression. I want to validate only one word, and second are the same. To do this, I wrote a regex
Model p=Pattern.compile("([a-z][a-zA-Z]*)\\s\1");
Matcher m = p.matcher ("nikhil nikhil");
Boolean t = m.matches ();
If (t)
System.out.println ("it's a game");
on the other
System.out.println ("is no match);
The result I get is always 'there no match. "
Your timely help will be very appreciated.
ConcerningHello.
You are missing a slash in the regex
Pattern p = Pattern.compile("([a-z][a-zA-Z]*)\\s\\1"); Matcher m = p.matcher("nikhil nikhil"); boolean t = m.matches(); if (t) { System.out.println("There is a match"); } else { System.out.println("There is no match"); }
-
Regular Expression Validator problem
Hello
I have a text box that I want to use a regular expression validator to check that one or more 9 char alphanumeric serial numbers have been entered.
< mx:RegExpValidator
source = "{entryField}.
property = "text".
Flags = "IM".
expression="{/[a-zA-Z0-9][a-zA-Z0-9][a-zA-Z0-9][a-zA-Z0-9][a-zA-Z0-9][a-zA-Z0-9][a-zA-Z0-9][a-zA-Z0-9][a-zA-Z0-9] ({|, | \\n|\\r|\\t)/} ')
valid = "handleResult (Event)" "
Invalid = "handleResult (Event)" "
trigger = "{entryField}.
triggerEvent = "textInput".
/ >
for the test
private void handleResult(eventObj:ValidationResultEvent):void {}
If (eventObj.type is ValidationResultEvent.VALID)
{
entryField.setStyle ("borderColor", "green");
entryField.setStyle ("largeurBordure", "2");
}
on the other
{
entryField.setStyle ("borderColor", "red");
entryField.setStyle ("largeurBordure", "2");
}
}
The problem is the handler function always comes back valid, even when it must be valid, as: 123456789 a12345678 lk231jkop
Can anyone tell where I go wrong? Thank you!I finally got it works like this:
triggerEvent = "keyUp".
expression = "^ ([A-Za-z0-9] {9} \ (|, |))" \n|\r)*)+$ »The big takeaway from this is that the textInput event does NOT work as advertised. Specifically, it does not occur during a deletion. In addition, it forces me to add a space at the end of a serial number using the above expression so that the validation is successful. Fortunately, 'keyUp' works very well :-)
-
Problem on regular expressions
Hi all
I'm working on a project that require me to separate the following examples:
+ 0, + 0.0000 E1, - 4.33 + E1, - 4.222 + E1, - 6.33 + E2, - 6.55 + E2
What I need is the final four results separately:
-4.33 + E1.
-4.222 + E1,
-6.33_E2,
-6.55 + E2.
I'm totally cool regular expression. Any help is appreciated!
Thank you
+ Kunsheng
Hi, Kunsheng
Good evening exercise to learn regular expressions...
For example, quick and dirty:
I have the strong feeling that something's wrong here (I guess in ([0-9] + [1-9] +)), but in any case the above code is just starting point for you.
Andrey.
-
problem of regular expression with brackets
Hello
I have a Zebra printer string that contains tokens that I want to search.
^ BY2, 3, 55 ^ FT50, 219 ^ BCN, Y, N... ^ FD >: [[number 1]] ^ FS
^ BY2, 3, 55 ^ FT525, 221 ^ BCN, Y, N... ^ FD >: [[serial number 2]] ^ FS
^ FT170, 192 ^ XG000. GRF, 1, 1 ^ FS
^ FT220, 430 ^ A0N, 27, 27 ^ FH\ ^ ea FD2. #00931 drum kit / ^ FS
↑ FT350, 460 ^ A0N, 27, 27 ^ FH\ ^ FD #00602 ^ FS
^ FO10, 32 ^ GB780, 480, 8 B, 1 ^ FS
^ FT720, 500 ^ A0N, 10, 10 ^ FH\ ^ FD [[Date Code]] ^ FSI want to find any instance of double hooks regardless of the bracketed text. I find [[SerialNumber 1]] for example, but I also want to analyze the entire string and ensure that there no case [[text]] left in the string. I was not able to build a regular expression that will find them.
Hi elrathia,.
Please find below screenshot
Kind regards
SrikrishnaNF
-
problem of the regular expression?
Hi I have a file that contains the following text
< cfset objNews.strNewsTickerLink = "index.cfm? pageid = 83" >
Now what I want to do is to scrape the value of this variable for example "index.cfm? pageid = 83. Now, this variable can be different... so basically regardless of the value of the variable objNews.strNewsTickerLink is on... I want to get it out. Now, I'm not that great with regular expressions... can someone help me?
THXThank you... but I found a even better who does the work for me
-
problem with the validation type: regular expression
Hi all
I have a text field element call p40_opt
in the past, this element could accept only the values 1-9
I made a posting type: regular expression
1 validation expression:
p40_opt
2 validation expression:
[1-9]
works very well.
Today, I wanted to add an option that p40_opt can also contains the value: 10
so I changed the range [1-10].
and now, it's not good because if I choose another option plus 1 and 10 to Ant
he do the validation.
what I'm missing here?
Thanks in advance
Under the direction of: naama on August 6, 2009 01:31The forum software has mutilated regular expressions in your message. You should edit, wrapping up the regular expressions in.
tags so they are properly displayed.
^ [1-9] {1} $. ^ $ 10
would be one regular expression that performs the required validation, however a regular expression doesn't appear to be the most straightforward way to validate such a range of values. A SQL or PL/SQL validation would be clearer, using the expression:
: p40_opt between 1 and 10
-
regular expression for alarm url
Hello
I have a problem with the regular expression. I want to filter only the name of a dsc alarm url: \\EW-MONITOR\monitor\000_t-ist_STB-M1-AS. Alarms.HI must be 000_t-ist_STB-M1-AS. Someone has a tip for me?
Best regards
--
JoachimIf as jcarmody asked, the name will always be between 'monitor\' and '. '. Alarms"use the output matching sub regular expression corresponds to
It takes the name from alam of the entire game.
-
Build a regular expression for data series of Arduino.
All,
I have a few Arduinos Council integrated into a test configuration that I can't save the data of. I now need to be able to see my data in real-time as it comes on the serial port. I found a VI that seems like it should work, my problem is that I can't get a regular expression to work.
The VI is not mine, but if I can get this working, I can easily put it in my VI.
Here's my Arduino code; This is the timestamp, followed four data points, with delimiters tab. It prints on the serial port as
190876 762314 814437 1108235 1091719
Serial.print(sTime); //Serial.print(", "); Serial.print("\t"); data = getdata(dataRead); data = data>>4; Serial.print(data); //Serial.print(", "); Serial.print("\t"); data = getdata(dataRead1); data = data>>4; Serial.print(data); //Serial.print(", "); Serial.print("\t"); data = getdata(dataRead2); data = data>>4; Serial.print(data); //Serial.print(", "); Serial.print("\t"); data = getdata(dataRead3); data = data>>4; Serial.println(data);
I think it is especially a problem with regular expression. Any advice or pointers would be great.
I wish there was a place where you just have to copy and paste my thong in and get a regular expression.
Do not use bytes to the port!
Take advantage of the termination character you have. Activate it on the series set up and set it to the newline character.
Now the VISA Read will wait until she has the entire line (or timeout if it does not). Then you can analyze your data out there.
I think the problem with your code, it's that you're looking for a backslash n. Not a line break. Turn it on the style of display of this constant and you will see it is fixed for normal display and backslash is no bar display.
-
Regular expression matching is not what matches Pattern
I read a lot of posts on how match model does not match what match regular expressions will be due some characters does not.
However, I found a problem with the other way. A simple Reg - Ex who works in the match pattern but not regular Expression match.
What I have here is just an example. I want to use regular Expression Match then I can specify some matches under.
The reg - ex's: one or more non-numeric characters, a space, one or more numeric characters. At the beginning of the string.
How can I get this to work in regular expression matching? I work in LabVIEW 2010f2 32 bit. Here is the code snippet and the results:
Rob
One of the subtle differences is the operator of negation for the character classes. In match pattern is ~, but for the Match RegEx is ^.
-
Allow specific characters - Regular Expression
Hello everyone
I am new to the regular expression and I have a very simple question. I use the function "read from the text file" to load a file delimited by tabs with 3 columns in my VI. Then, the string is converted to table and I use the values.
Nevertheless, I would like to develop a "filter" that allows only digits (0-9), colon, comma , and point to strings.
Using the function "matches regular expression", I tried a regular expression like this:
[^ 0-9] | [^\]. [|^:]| [^,]
But it does not work.
Could someone help me with this problem?
Thank you
Dan07
Use search and replace with regular Expression String selected.
Maybe you are looking for
-
Reference Dell GX 260 XP SP3 BIOS Admin password lost.
CAN'T FIND PASSWORD RECOVERY APPS THAT DON'T REQUIRE A CD DISC (ISO) RUN. CANT RUN BOOT DISKS ON THE SYSTEM ALSO. OPEN TO ALL SOLUTIONS!
-
Customization of the user does not not as expected
JDeveloper version - 11.1.1.7.0My requirement is when a user customizes a page and re - called leave the same browser or browser; the custom page must be provided to them. Also when the URL is called from a different machine, design time page should
-
How endece server send the update request
Hi allI read the short guide to the cluster server, I understand that I can submit the update request to all nodes of follower, and then the follower node will forward the request to update to the node leader for update operation. But if I configure
-
Mulitple-NIC vs. CASL for VMotion
HelloTNX for readingI use Vsphere 6My Switch have Nexus (2Port 10Gbs for Vmotion)! and I don't know which one is better!Mulitple-NIC or CASL (LAG and Active Mode) for VMotion?and another Q is for an optimal speed to migrate Vmition. better MTU (Jumbo
-
Hello, my digital editions not allow. Crashes.
I bought a product which is connected to the digital editions. I was told to download and install Digital Editions 4.5. So I did. He would then be authenticated to be used on multiple devices. But the authentication program will not work. Nothing hap