Questions tagged [match]

A programming concept about finding results based on some kind of search. Typically used when talking about regular expressions.

A programming concept about finding results based on some kind of search. Typically used when talking about regular expressions.

See also , ,

8645 questions
2
votes
1 answer

Perl outputs too many columns

I have one table of associated marker results and one table of disease markers. Both files have headers. This is what the associated marker table looks like: snps_BCG24 gene_BCG24 statistic_BCG24 pvalue_BCG24 FDR_BCG24 beta_BCG24 …
user3482899
  • 320
  • 3
  • 10
2
votes
2 answers

Solr - termfreq partial matches

I'm using Solr to query a set of documents and I want to get the number of matches for certain term, right now I'm using termfreq(text,'manage') However this does not hit on Manager or Management termfreq(text,'manage*') returns the same count.…
A.O.
  • 3,733
  • 6
  • 30
  • 49
2
votes
2 answers

java regex match is null

I am trying to find a particular pattern but also exclude certain patterns. For some reason, my regex is not working in my program, but it works with an online regex tester. What is the problem? Here is the online test: regex101 Here is the java…
kschieck
  • 1,407
  • 2
  • 16
  • 29
2
votes
1 answer

Regular expression to match string not containing " " "?

Input: sample Output: "/blabla.jpg", "/blabla.js", "/pdf/sample.pdf" etc. I want to select by…
2
votes
4 answers

Java: PatternSyntaxException thrown with regex .*-\\d+{.*}\\d+-.*

I am trying to make a regex to determine if a String contains a -, some amount of digits, a {, nothing/some sequence of characters, a }, some amount of digits, and a final -. For…
James Ko
  • 32,215
  • 30
  • 128
  • 239
2
votes
5 answers

python regex: match last instance of character followed by certain parttern

I want to edit my code below to catch all strings which END with "_C[any letter/ any number/ or nothing]" Here is my list name_list = ['chrome_PM', 'chrome_P', 'chromerocker_C', 'chromebike_P1', …
Boosted_d16
  • 13,340
  • 35
  • 98
  • 158
2
votes
1 answer

Android 4.3 error: Device driver API match, Linux-r3p2-01rel3

I am developing an Android app to receive data from a smartwatch and upload them to remote server via Internet. The app works fine on Android 4.2.2 and 4.1.2 (currently tested on these two version) but it doesn't work on Android 4.3 (tested on two…
Zheng Xiaochen
  • 643
  • 5
  • 8
2
votes
1 answer

Extracting City and Zipcode from String in PHP

I need a fast generic way in PHP to extract the City and Zipcode (when available) information from an input string. The string can be of the following forms $input_str = "123 Main Street, New Haven, CT"; $input_str = "123 Main Street, New Haven,…
rogerb
  • 251
  • 1
  • 4
  • 11
2
votes
1 answer

Powershell regex to match string except first one

I have following html patterns. href="{{url}}" class="item-name prdctNm">{{name}}
href="/drugs/sporanox-100-mg-33294" class="item-name prdctNm">Sporanox (100 Mg) href="/drugs/sporan-200-mg-34240" class="item-name prdctNm">Sporan (200…
Yogesh
  • 129
  • 1
  • 2
  • 10
2
votes
2 answers

jquery Autocomplete : autocomplete does not stop if string does not match

I used the auto-complete function in jquery. It's data source are the results from a php-back-end. $("#ice_id").autocomplete("ice-ver.php", { extraParams : { flavour_id: $("#flavour_id").val() } }); Let us take following example: We type in the…
Daniyal
  • 885
  • 3
  • 16
  • 28
2
votes
2 answers

.* matches 2 times

I tried to match .* with C# regular expression, and it turns out it matches any string two times: first the full string, than a second time an empty string. I expected .* to match everything in a single match. I'm completely puzzled why that should…
trapicki
  • 1,881
  • 1
  • 18
  • 24
2
votes
1 answer

javascript - match defined tags present in a string

I defined some tags in an array: var myArray = [ "mouse", "common", "malcom", "mountain", "melon", "table" ]; Now I want to extract my defined tags from a string, for example from the string: the mouse is on the desk, I want…
user3746998
2
votes
2 answers

Regular expression for any double type number

I am trying to do the following: myVar = q.match(/[0-9]*\.[0-9]+|[0-9]+/); However, when I type a decimal, myVar doesn't pick up the decimal until after I type decimal values. Entered 3, myVar = 3 Entered ., myVar = 3 Entered 3, myVar 3.3 How do…
test
  • 33
  • 1
  • 4
2
votes
2 answers

how can I search letter pairs matches with regex?

I'm using regex to find occurrences in a string python, for example: "cw cx", "cw cx av", "cw cx dr wt" or "cw cx qw hv eb". The match can be 2, 3, 4 or 5 pairs. I'm thinking something like this "([a-zA-Z]{2}) ([a-zA-Z]{2})" Please help me
GSandro_Strongs
  • 773
  • 3
  • 11
  • 24
2
votes
4 answers

Match Regex: [everything before number], [number]

I'm using a .match() on a bunch of strings that vary quite a bit. I'm wanting to get the last number inside a bracket from the string, and from there get everything before that. So for example: 1 serving (57.0 g) 1 slice, small (2" x 2-1/2" x…
ditto
  • 5,917
  • 10
  • 51
  • 88
1 2 3
99
100