Skip to content Skip to sidebar Skip to footer
Showing posts with the label Regex

Regexp, Capture Between Parentheses, Javascript

I have regexp that extracts values between parentheses. It's working most of the time but not w… Read more Regexp, Capture Between Parentheses, Javascript

How To Use Just Asterisk Wildcard When Searching?

I want to just support asterisk(*) wildcard not regex. This is my code : for example : checkNames[i… Read more How To Use Just Asterisk Wildcard When Searching?

How To Modify A Regular Expression To Parse A Parameter From A Youtube Url

I've got this regular expression: /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?… Read more How To Modify A Regular Expression To Parse A Parameter From A Youtube Url

Reading Multiple Xml Attributes With Qml

I've got and XML String in javascript (qml). My goal is to filter informations regarding differ… Read more Reading Multiple Xml Attributes With Qml

Making A Pipe With Regex On Angular2

I've already asked the similar question here: stackoverflow.com/questions/42674096/how-to-make-… Read more Making A Pipe With Regex On Angular2

How To Determine Whether String Is Code-method?

I explain my question via 2 examples: Example1: var str1 = 'this is a test this… Read more How To Determine Whether String Is Code-method?

Javascript Global Match With Capturing Groups

Can anyone tells me why does't the second snippet catchs the 'groups' when use g flag … Read more Javascript Global Match With Capturing Groups

Javascript - Insert A Variable Into Regexp

I have the following which works fine, allowing a form field to be valid if blank or containing the… Read more Javascript - Insert A Variable Into Regexp

Regex Returns String Undefined

I am trying to extract hash value from an magnet link but it returns undefined var tesst = 'mag… Read more Regex Returns String Undefined

How Can I Replace A Backslash With A Double Backslash Using Regexp?

I need to modify the value using javascript, to make it ready to be put as part of a SQL insert que… Read more How Can I Replace A Backslash With A Double Backslash Using Regexp?

Reg Exp: Match Numbers And Spaces Only

I am writing a js script to validate a form field and I need to check it contains only numbers and … Read more Reg Exp: Match Numbers And Spaces Only

Can We Search Regexp From The Middle Of A Text Back To Beginning?

I have a text, and a 'marker' (regexp = 'error'). I can find position of the 'm… Read more Can We Search Regexp From The Middle Of A Text Back To Beginning?

Formatting The Phone Number

The below textbox is printing the value of the phone number after getting it from the database. So… Read more Formatting The Phone Number

Regex Code In Javascript For Restricting Input Field

I have a question about restricting the value entered in some input field. I would like to input th… Read more Regex Code In Javascript For Restricting Input Field

Javascript Regex Group Multiple

How can I get all groups of a regex match? var str = 'adam peter james sylvester sarah'; v… Read more Javascript Regex Group Multiple

Why Does A Javascript Regexp Created By /.../ Work But The Same Created Via "new Regexp" Does Not?

I'm confused as to what the difference here is and why one works and the other does not. Can so… Read more Why Does A Javascript Regexp Created By /.../ Work But The Same Created Via "new Regexp" Does Not?

How To Create Regex For 00.00?

I want to create a regex which validate the all below conditions. Only numeric [0-9] value allow. … Read more How To Create Regex For 00.00?

Jquery Global Regex For Replace With Variable

in the following example I am trying to replace all instances of the newname variable with -, howev… Read more Jquery Global Regex For Replace With Variable

Is There A Way To Make Jslint Happy With This Regex?

When running my JavaScript through JSLint, I get the following two errors from the same line of cod… Read more Is There A Way To Make Jslint Happy With This Regex?

Regular Expression For Non-zero Positive Floats

Regex for positive float numbers provides almost the correct expressions, but all of them include 0… Read more Regular Expression For Non-zero Positive Floats