306 Topics
| |
I have text that is displayed from a database and I have managed to remove the first h3 tag in the text by using the following code but I would also like to remove the two <br> tags that are before the paragraph of text <h2 class="productsummaryheading mb-0">Product Summary</h2> <?php … | |
Hello, I would like to wrap (surround) all words "flyer" (case insensitive) in the HTML text content, not those in the link. My RegEx works fine on Regex101: https://regex101.com/r/NVmXd1/1 Attached, my HTML file to test my (non working) JS RegEx. Thank you and regards. | |
I am trying to extract three values from the td tags in an html downloaded file. <tr align="right"><td>236</td><td>Roy</td><td>Allyson</td> <tr align="right"><td>237</td><td>Marvin</td><td>Pamela</td> <tr align="right"><td>238</td><td>Micah</td><td>Kristine</td> <tr align="right"><td>239</td><td>Collin</td><td>Raquel</td> I am using the pattern match = re.findall(r'<td.?>([\d+])([.?])*<\/td>', file) The file is created with a read() statement. The output should look like (236, "Roy", "Allyson") (237, … | |
I'm really bad with regex. For the purposes of URI rewriting, I'm trying to figure out how to match a word one or more times in a string. For example, I want to do something like: string/string/string/foo/bar => foo/bar string/string/bazbat => bazbat Currently I have: ^string/(.*)$ => $1 and that … | |
I'm trying to figure out why the regex code below gives me two different results, depending on where I use it. [A-Z]{0,1}[a-z]{2,}[:] **On phpliveregex.com, the above regex code matches the following:** narrator: Narrator: **When used in preg_match, the above regex code matches the following:** narrator: Narrator: NARRATOR: PS I'm not … | |
Hi I'm trying to create a script in powershell that finds a string in a file and then modifies it but I'm having issues matching the string I want. So, I'm trying to make sure that I can find this type of string |d where d is is any digit, … | |
I need to get the values from below following html snippet. So far I came up with this regex which helps me trim it down to the values I needed, but to automate this I need to join 2 regex statements to get the result "18" which is where I … | |
Hi, how can I use regex or string replace to add missing "p" tags to sentences without tags. I tried matching* and splitting first the whole string matching "h" and "pre" tags but dont know how to merge it. `*let regexRule = /<pre>(.|\n|\r\n)[\s\S]*?<\/pre>/g;` Example - input let someVariable = "Basket … | |
I need some quick regex help with matching the same word twice in a pattern. For example, I'm trying to match on the PHP code: `if (isset($foo) AND $foo)` or `if (isset($bar) AND $bar)` where `$foo` and `$bar` are any valid variable name. However, I don't want to match on … | |
Hey Guys, So I have a JTextfield in the cells of 1 of the columns in my JTable I want to allow only numbers and up to one dot/period. Doesant need to contain a period. The persiod can be anywhere except at the end of the number. 1 ok .1 … | |
Hello, I'm hoping for some help with a regex that has me stumped. My skill with regex is rather rudimentary. To start, here are a couple of example URLs, and whether I want to match them or not: collection/col1 // MATCH collection/col2 // FAIL collection/col1/products/pro1 // FAIL My criteria: * … | |
**The Problem:** I have a long string of serial numbers, that looks like this: "1_2_3_4_5 0_100_1_0_4 1_2_3_4_5 0_100_1_0_4 0_100_1_0_4 3_1_34_5_6"; I want to remove all serial numbers that do not occur EXACTLY 3 or 1 times in the string. **The Result:** In this case the return string should be: 0_100_1_0_4 … | |
I am not a computer professional, only like to develop my own toys. I am using Globi Flow to get the info I need from the XML file. All is done, except for one instance where I do not have the closing tag Regular node with closing tag: <proper price>$4</price> … | |
Suppose we need to populate and filter a Datagrid with the data coming from an Access table. It could be of course a table from Sql Server also. Form dataGridSelect contains two buttons and a DataGridView. Clicking the first button will populate the DataGridView the data comming from a Sql … | |
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 … | |
Hi im im trying to get attributes from two diffrent tag names.. <img class="chimg" alt="SOME TEXT" src=" #1 IMAGE LINK TO GET"/> <span>" #2 TIME TO GET" </span>" SOME TEXT "</a> </h3> <div> <a href=' #4 LINK TO GET' onclick="window.open('Some link'); return true;" title=' #3 TITLE TO GET' >SOME TEXT</a> … | |
I've been Googling this one, and I've come across solutions, but they don't seem to work for me. The code is as follows: <?php $name1 = "Jack Random"; // true $name2 = "JackRandom"; // true $name3 = "Jack;Random"; // false $name4 = "JackRand;om"; // false // Accept only A-Z, a-z, … | |
I've always been bad with regular expressions syntax. I am converting text into Bezier curves, polygons, etc. Part of that is identifying points in the form `(x,y)` where x and y are coordinates in a graph. I am extracting x and y as doubles and creating Point objects with those … | |
Hello guys i need to get all currencies in the world is there anyone who knows where to get them in a file so i can import it in my website or someone who can help me to solve with regular expression here is the [WEBSITE](http://www.xe.com/currencytables/?from=INR) where i have fund … | |
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 … | |
I have this regex ((?<!tpg-)assets\/[a-z\/\.](([^{]*?)\.(svg|jpg|png|gif|ico))) Which I use to replace asset source patterns in HTML or JS on with my build script.. It works, all but for one combination. The above regex fixed the situation, but wont work with V8 regex. Is there a work around? Take a look at … | |
Here is a weird regular expression for emails . We can have various kind of email addresses [email]string1@somemail.com[/email] [email]string1@somemail.co.in[/email] [email]string1.string2@somemail.com[/email] [email]string1.string2@somemail.co.in[/email] The following regular expression can find any of the mails above email2="santa.banta@gmail.co.in" email1="arindam31@yahoo.co.in'" email="bogusemail123@sillymail.com" email3="santa.banta.manta@gmail.co.in" email4="santa.banta.manta@gmail.co.in.xv.fg.gh" email5="abc.dcf@ghj.org" email6="santa.banta.manta@gmail.co.in.org" [CODE]re.search('\w+[.|\w]\w+@\w+[.]\w+[.|\w+]\w+',email) >>> x=re.search('\w+[.|\w]\w+@\w+[.]\w+[.|\w+]\w+',email2) >>> x.group() 'santa.banta@gmail.co.in' >>> x=re.search('\w+[.|\w]\w+@\w+[.]\w+[.|\w+]\w+',email1) >>> x.group() 'arindam31@yahoo.co.in' … | |
I've had a real good look around at it seems to be quite difficult, all I can find is ones that claim to work in PHP, I tried them anyway and get invalid groupings, escape sequnses etc... I cannot find one for C#. I do not have the ipv6 to … | |
Hi, i have a string that i want to match to a regular expression. The string is methodName(paraT1 para1, paraT2.name2 para2, paraT3.name3 para3) Inside the () there can be multiple of "aaa.bbb ccc" and "ddd eee" patterns The regular expression i wrote was : (\w*)(\s*)\((((\w*\.\w*)\s*(\w*))|((\w*)\s*(\w*)))(\s*\,\s*(((\w*\.\w*)\s*(\w*))|((\w*)\s*(\w*))))*\) and the I get the … | |
Group, I need to insert an "If/Then" statement that will require the command to check the string for multiple variables. In other words it needs to say something like this: If Microsoft.VisualBasic.Mid(txtLine, 18, 1) = "C" or "T" or "G" or "W" Then Go do something End If After doing … | |
Can someone kindly help me with a solution to this assignment http://math.hws.edu/eck/cs225/s09/lab9/ CPSC 225, Spring 2009 Lab 9: Sets in the Java Collection Framework For this week's lab, you will use two of the classes in the Java Collection Framework: HashSet and TreeSet. You will use these classes to implement … | |
''' in Python 3.4 Attempting to parse and print one line (actually a number)from the downloaded code from yahoo sourecode using regex to pull the number that is located at the (.*?). I've tried everything I can think of to get this to work - I expect the problem is … | |
dear all, i am facing a problem. actually i wanna get user validation with the following code, I want to insert only [a-z0-9_] character in user login....when i insert username like this 'asdfdfad' it returns else part ( special characters are not allowed ). please solve it ..... thanks if … | |
I want to know if I would be able to replace different words all in one regex expression. For example if I wanted to replace the name John with Joe and Smith with Doe. Would I be able to do that with one expression? Here is a code that I … | |
Hi, I hope this is the right place to post this. I am researching the possibility of registering a new domain name. I haven't decided what the correct name is yet but I want to figure out what names are available and would like to figure out a way to … |
The End.