<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[C# regex להתעלם מכל תו לבן או רווח]]></title><description><![CDATA[<p dir="auto">יש לי קובץ טקסט שאני טוען אותו לזיכרון ומתחיל לחפש בו כל מיני מחרוזות.<br />
הבעיה היא שכל פעם שהוא פוגש סוף פסקה או מעבר שורה, הוא מפסיק את החיפוש.<br />
למשל אני רוצה לחפש כל רצף תווים כזה @# שנמצא בין ! ל %.<br />
אני משתמש כעת בריגקס הבא:</p>
<pre><code>![^#]{0,}?(#@).+?%
</code></pre>
<p dir="auto">אני חושב שצריך להכניס איזה התעלמות מכל מעבר שורה אחרי זה, כלומר מעבר שורה אופציונאלי, אבל זה לא עובד, כזה:</p>
<pre><code>![^#]{0,}?(#@)\r?.+?%
</code></pre>
<p dir="auto">אפה הטעות שלי? והאם באמת \r אמור לתת לי את האופציה הזו. האם יש משהו יותר טוב שיקח בחשבון את כל הרווחים הלבנים והטאבים וכו' ויתעלם מהם לחלוטין? ולמה זה בכלל לא נכלל במה שכתבתי לו . שפרושו כל תו?</p>
<p dir="auto"><em>פורסם במקור בפורום CODE613 ב13/08/2017 14:59 (+03:00)</em></p>
]]></description><link>https://tchumim.com/topic/1318/c-regex-להתעלם-מכל-תו-לבן-או-רווח</link><generator>RSS for Node</generator><lastBuildDate>Sun, 15 Mar 2026 09:03:04 GMT</lastBuildDate><atom:link href="https://tchumim.com/topic/1318.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 29 Jan 2018 11:48:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to C# regex להתעלם מכל תו לבן או רווח on Mon, 29 Jan 2018 11:48:50 GMT]]></title><description><![CDATA[<p dir="auto">אכן, קסם. ואני לתומי חשבתי שזה כמו הגרפ של אינדזיין ששמה אין * רק .+?<br />
הבנתי שיש כמה סוגים של regex בכל מקרה...</p>
<p dir="auto"><em>פורסם במקור בפורום CODE613 ב13/08/2017 16:20 (+03:00)</em></p>
]]></description><link>https://tchumim.com/post/9011</link><guid isPermaLink="true">https://tchumim.com/post/9011</guid><dc:creator><![CDATA[נתנאל]]></dc:creator><pubDate>Mon, 29 Jan 2018 11:48:50 GMT</pubDate></item><item><title><![CDATA[Reply to C# regex להתעלם מכל תו לבן או רווח on Mon, 29 Jan 2018 11:48:49 GMT]]></title><description><![CDATA[<p dir="auto">כי בטקסט שלך השבירת שורה הייתה מורכבת גם מnew-line ולא רק carier-return.<br />
אם היית כותב</p>
<pre><code>![^#]{0,}?(#@)\n\r?.+?%
</code></pre>
<p dir="auto">זה היה עובד לך אבל זה אריכות. המשמעות של + היא "אחד או יותר": ההתאמה שצויינה קודם חייבת להימצאות לפחות פעם אחת אבל יכולה להיות גם יותר. בעוד * אומר "אפס או יותר". ממילא זה מייתר את הסימן שאלה.</p>
<p dir="auto"><em>פורסם במקור בפורום CODE613 ב13/08/2017 16:10 (+03:00)</em></p>
]]></description><link>https://tchumim.com/post/9010</link><guid isPermaLink="true">https://tchumim.com/post/9010</guid><dc:creator><![CDATA[dovid]]></dc:creator><pubDate>Mon, 29 Jan 2018 11:48:49 GMT</pubDate></item><item><title><![CDATA[Reply to C# regex להתעלם מכל תו לבן או רווח on Mon, 29 Jan 2018 11:48:49 GMT]]></title><description><![CDATA[<p dir="auto">**כן!!! זה זה!!**אתה יכול להגיד כמה מילים איך עשית את הקסם הזה? ולאן נעלם כל הקטע של .+?<br />
וכן מדוע שכתבת לו כל תו שהוא לא % הוא הבין \r  בכלל זה ושאני אמרתי לו שתו כל שהוא הוא לא לקח את זה בחשבון?</p>
<p dir="auto"><em>פורסם במקור בפורום CODE613 ב13/08/2017 16:04 (+03:00)</em></p>
]]></description><link>https://tchumim.com/post/9009</link><guid isPermaLink="true">https://tchumim.com/post/9009</guid><dc:creator><![CDATA[נתנאל]]></dc:creator><pubDate>Mon, 29 Jan 2018 11:48:49 GMT</pubDate></item><item><title><![CDATA[Reply to C# regex להתעלם מכל תו לבן או רווח on Mon, 29 Jan 2018 11:48:48 GMT]]></title><description><![CDATA[<p dir="auto">ככה טוב?</p>
<pre><code>![^#]{0,}?(#@)[^%]{0,}?%
</code></pre>
<p dir="auto">או פשוט יותר ככה:</p>
<pre><code>![^#]*(#@)[^%]*%
</code></pre>
<p dir="auto"><em>פורסם במקור בפורום CODE613 ב13/08/2017 15:51 (+03:00)</em></p>
]]></description><link>https://tchumim.com/post/9008</link><guid isPermaLink="true">https://tchumim.com/post/9008</guid><dc:creator><![CDATA[dovid]]></dc:creator><pubDate>Mon, 29 Jan 2018 11:48:48 GMT</pubDate></item><item><title><![CDATA[Reply to C# regex להתעלם מכל תו לבן או רווח on Mon, 29 Jan 2018 11:48:48 GMT]]></title><description><![CDATA[<p dir="auto">סליחה..:). אני משתמש באספרסו בבית...<br />
[url]הנה לינק למה שתופס הכל.[/url]</p>
<p dir="auto">וכאן הוא אמור לתפוס את המעבר שורה האופציונלי אבל הוא פשוט לא מוצא אותו</p>
<p dir="auto"><em>פורסם במקור בפורום CODE613 ב13/08/2017 15:46 (+03:00)</em></p>
]]></description><link>https://tchumim.com/post/9007</link><guid isPermaLink="true">https://tchumim.com/post/9007</guid><dc:creator><![CDATA[נתנאל]]></dc:creator><pubDate>Mon, 29 Jan 2018 11:48:48 GMT</pubDate></item><item><title><![CDATA[Reply to C# regex להתעלם מכל תו לבן או רווח on Mon, 29 Jan 2018 11:48:48 GMT]]></title><description><![CDATA[<p dir="auto">נתנאל הכי טוב שתעשה דוגמה קטנה פה: <a href="https://regex101.com" target="_blank" rel="noopener noreferrer nofollow ugc">https://regex101.com</a>, לחץ על save בסיום ושתף אותנו.</p>
<p dir="auto"><em>פורסם במקור בפורום CODE613 ב13/08/2017 15:38 (+03:00)</em></p>
]]></description><link>https://tchumim.com/post/9006</link><guid isPermaLink="true">https://tchumim.com/post/9006</guid><dc:creator><![CDATA[dovid]]></dc:creator><pubDate>Mon, 29 Jan 2018 11:48:48 GMT</pubDate></item><item><title><![CDATA[Reply to C# regex להתעלם מכל תו לבן או רווח on Mon, 29 Jan 2018 11:48:47 GMT]]></title><description><![CDATA[<p dir="auto"><img src="/assets/uploads/files/1517226525726-%D7%AA%D7%9E%D7%95%D7%A0%D7%94-%D7%A9%D7%A0%D7%99%D7%94-resized.jpg" alt="תמונה שניה.jpg" class=" img-fluid img-markdown" /><br />
<img src="/assets/uploads/files/1517226522616-%D7%AA%D7%9E%D7%95%D7%A0%D7%94-%D7%90%D7%97%D7%AA-resized.jpg" alt="תמונה אחת.jpg" class=" img-fluid img-markdown" />תודה רבה! זה ממש מכסה הרבה מregex/<br />
נסיתי את מה שכתוב שם ש  \s שקול לכל רווח לבן, וכן ל\r\t\f\n  והיה נראה שזה בדיוק מה שחפשתי.<br />
אבל למעשה, כאשר אני מחפשגם את זה, הוא באמת מוצא גם את הרווח.<br />
אבל כאשר אני מחפש אופיונאלי, הוא לא נותן את כל המחרוזת.</p>
<p dir="auto"><em>פורסם במקור בפורום CODE613 ב13/08/2017 15:31 (+03:00)</em></p>
]]></description><link>https://tchumim.com/post/9005</link><guid isPermaLink="true">https://tchumim.com/post/9005</guid><dc:creator><![CDATA[נתנאל]]></dc:creator><pubDate>Mon, 29 Jan 2018 11:48:47 GMT</pubDate></item><item><title><![CDATA[Reply to C# regex להתעלם מכל תו לבן או רווח on Mon, 29 Jan 2018 11:48:47 GMT]]></title><description><![CDATA[<p dir="auto">אולי יועיל לך<br />
<a href="/assets/uploads/files/1517226521648-c-%D7%9E%D7%93%D7%A8%D7%99%D7%9A-%D7%9C%D7%91%D7%99%D7%98%D7%95%D7%99%D7%99%D7%9D-%D7%A8%D7%92%D7%95%D7%9C%D7%A8%D7%99%D7%99%D7%9D-fxp.pdf">[#C]מדריך לביטויים רגולריים - FXP.PDF</a></p>
<p dir="auto"><em>פורסם במקור בפורום CODE613 ב13/08/2017 15:20 (+03:00)</em></p>
]]></description><link>https://tchumim.com/post/9004</link><guid isPermaLink="true">https://tchumim.com/post/9004</guid><dc:creator><![CDATA[code.net]]></dc:creator><pubDate>Mon, 29 Jan 2018 11:48:47 GMT</pubDate></item></channel></rss>